Merge pull request #2016 from canonical/WD-29968 #195
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |