forked from canonical/ubuntu.com
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (25 loc) · 845 Bytes
/
sitemap.yaml
File metadata and controls
29 lines (25 loc) · 845 Bytes
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
name: Generate sitemap for static pages on ubuntu.com
on:
push:
branches:
- main
paths:
- "templates/**"
jobs:
generate-sitemap:
if: github.repository == 'canonical/ubuntu.com'
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Call sitemap generation endpoint
env:
SITEMAP_SECRET: ${{ secrets.SITEMAP_SECRET }}
run: |
curl --fail-with-body -X POST "https://ubuntu.com/sitemap_tree.xml" \
-H "Authorization: Bearer $SITEMAP_SECRET"
- name: Send message on failure
env:
BOT_URL: ${{ secrets.BOT_URL }}
if: failure()
run: curl -X POST -F "workflow=${GITHUB_WORKFLOW}" -F "repo_name=${GITHUB_REPOSITORY}" -F "action_id=${GITHUB_RUN_ID}" $BOT_URL?room=web-alerts