File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Update Sitemap
2
+
3
+ on :
4
+ schedule :
5
+ - cron : " 0 4 * * 0" # Runs every Sunday at 4am UTC
6
+ workflow_dispatch : # Allow manual trigger
7
+
8
+ permissions :
9
+ contents : write
10
+
11
+ jobs :
12
+ build :
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - name : Checkout code
17
+ uses : actions/checkout@v2
18
+
19
+ - name : Set up Python
20
+ uses : actions/setup-python@v4
21
+ with :
22
+ python-version : ' 3.12'
23
+
24
+ - name : Install dependencies
25
+ run : pip install requests tqdm
26
+
27
+ - name : Run sitemap generation script
28
+ run : python generate_sitemap.py
29
+
30
+ - name : Check it was generated
31
+ run : ls -l
32
+
33
+ - name : Commit and push changes
34
+ run : |
35
+ git config user.name "sitemap-github-actions[bot]"
36
+ git config user.email "[email protected] "
37
+ git add sitemap.xml sitemap2.xml
38
+ git commit -m "Update sitemap" || echo "No changes to commit"
39
+ git push
You can’t perform that action at this time.
0 commit comments