-
-
Notifications
You must be signed in to change notification settings - Fork 167
39 lines (30 loc) · 1.35 KB
/
sitemap.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
32
33
34
35
36
37
name: Generate dpp.dev sitemap
on:
schedule:
- cron: '0 6 * * 6'
jobs:
updater:
name: Generate Sitemap
if: github.repository == 'brainboxdotcc/DPP'
runs-on: ubuntu-20.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit
- name: Checkout github pages repository
run: git config --global user.email "[email protected]" && git config --global user.name "D++ Sitemap Updater Bot" && git clone https://braindigitalis:[email protected]/brainboxdotcc/dpp-web.git /home/runner/dpp-web
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Install sitemap-generator
run: npm install -g sitemap-generator-cli
- name: Run sitemap-generator
run: cd /home/runner/dpp-web && npx sitemap-generator --no-respect-robots-txt --verbose https://dpp.dev/
- name: commit and push
run: cd /home/runner/dpp-web && git add sitemap.xml && git commit -am "Update sitemap" && git pull --ff && git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}