Skip to content

Merge pull request #1995 from canonical/WD-27605-spark-page-update #197

Merge pull request #1995 from canonical/WD-27605-spark-page-update

Merge pull request #1995 from canonical/WD-27605-spark-page-update #197

Workflow file for this run

name: Generate sitemap for static pages on canonical.com
on:
push:
branches:
- main
paths:
- "templates/**"
jobs:
generate-sitemap:
if: github.repository == 'canonical/canonical.com'
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Call sitemap generation endpoint
run: |
curl --fail-with-body -X POST "https://canonical.com/sitemap_tree.xml" \
-H "Authorization: Bearer ${{ secrets.SITEMAP_SECRET }}"
- name: Send message on failure
if: failure()
run: curl -X POST -F "workflow=${GITHUB_WORKFLOW}" -F "repo_name=${GITHUB_REPOSITORY}" -F "action_id=${GITHUB_RUN_ID}" ${{ secrets.BOT_URL }}?room=web-design