-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 1.07 KB
/
gsc-submit.yml
File metadata and controls
35 lines (30 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: GSC Sitemap Submit
# Submits the public sitemap to Google Search Console after content changes.
# Pairs with indexnow.yml (Bing/Yandex/Seznam) — Google doesn't participate in IndexNow.
#
# Requires a GSC_SERVICE_ACCOUNT_KEY secret containing the JSON key of a
# Google Cloud service account that's been added as a user on the
# Search Console property for docs.sharpapi.io.
# Setup: create SA in GCP → grant Search Console API → add SA email to GSC
# property as Owner or Full → paste full JSON into the GH secret.
on:
push:
branches: [main]
paths:
- 'public/sitemap.xml'
- 'content/**/*.mdx'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
submit:
name: Submit sitemap to GSC
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Submit sitemap
env:
GSC_SERVICE_ACCOUNT_KEY: ${{ secrets.GSC_SERVICE_ACCOUNT_KEY }}
run: node scripts/submit-sitemap-gsc.mjs