Skip to content

Commit 39bb9d6

Browse files
authored
Create sitemap.yml
1 parent c0daabd commit 39bb9d6

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

‎.github/workflows/sitemap.yml‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Auto Generate Sitemap
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
sitemap:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
contents: write # THIS FIXES
13+
14+
env:
15+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Generate sitemap.xml
22+
uses: cicirello/generate-sitemap@v1
23+
with:
24+
base-url-path: https://design.devtem.org
25+
include-html: true
26+
drop-html-extension: true
27+
exclude-paths: |
28+
assets
29+
scripts
30+
node_modules
31+
admin
32+
33+
- name: Commit sitemap
34+
run: |
35+
git config user.name "github-actions"
36+
git config user.email "actions@github.com"
37+
38+
git add sitemap.xml
39+
git diff --cached --quiet || git commit -m "Auto update sitemap"
40+
git push

0 commit comments

Comments
 (0)