forked from FusionAuth/fusionauth-site
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 1010 Bytes
/
updatesitemap.yml
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
name: update_sitemap
# this job pushes the sitemap to google search console.
# loosely based on https://stateful.com/blog/google-search-console-github
# only ping google at certain times
on:
# run once a day at ~5am MT
# schedule:
# - cron: '31 10 * * *'
workflow_dispatch:
jobs:
update_sitemap:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: '.src/scripts/publish_sitemap/package-lock.json'
- name: Install dependencies
run: cd src/scripts/publish_sitemap && npm install
- name: Update sitemap
env:
GOOGLE_SEARCH_CONSOLE_JSON_KEY: ${{ secrets.GOOGLE_SEARCH_CONSOLE_JSON_KEY }}
run: node src/scripts/publish_sitemap/publish_sitemap.js
shell: bash