Skip to content

update_sitemap

update_sitemap #95

Workflow file for this run

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@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
cache-dependency-path: '.github/scripts/publish_sitemap/package-lock.json'
- name: Install dependencies
run: cd .github/scripts/publish_sitemap && npm install
- name: Update sitemap
env:
GOOGLE_SEARCH_CONSOLE_JSON_KEY: ${{ secrets.GOOGLE_SEARCH_CONSOLE_JSON_KEY }}
run: node .github/scripts/publish_sitemap/publish_sitemap.js
shell: bash