File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Generate Sitemap
2+
3+ on :
4+ push :
5+ branches : [main] # Certifique-se de que sua branch principal se chama main
6+
7+ jobs :
8+ sitemap_job :
9+ runs-on : ubuntu-latest
10+ name : Generate a sitemap
11+ permissions :
12+ contents : write # Permissão para o GitHub gravar o arquivo no seu repositório
13+ steps :
14+ - name : Checkout the repo
15+ uses : actions/checkout@v3
16+ with :
17+ fetch-depth : 0
18+
19+ - name : Generate the sitemap
20+ uses : cicirello/generate-sitemap@v1
21+ with :
22+ base-url-path : https://bernardoyt1093-wq.github.io/Js-Master/
23+
24+ - name : Commit and push if changed
25+ run : |
26+ git config --global user.name "github-actions[bot]"
27+ git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
28+ git add sitemap.xml
29+ git commit -m "Automated sitemap update" || exit 0
30+ git push
You can’t perform that action at this time.
0 commit comments