Skip to content

Commit 0fd15f8

Browse files
Update main.yml
1 parent 9657a1e commit 0fd15f8

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/main.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
11
name: Generate Sitemap
2+
23
on:
34
push:
4-
branches: [main]
5+
branches: [main] # Certifique-se de que sua branch principal se chama main
6+
57
jobs:
68
sitemap_job:
79
runs-on: ubuntu-latest
810
name: Generate a sitemap
11+
permissions:
12+
contents: write # Permissão para o GitHub gravar o arquivo no seu repositório
913
steps:
10-
- uses: actions/checkout@v3
14+
- name: Checkout the repo
15+
uses: actions/checkout@v3
1116
with:
1217
fetch-depth: 0
18+
1319
- name: Generate the sitemap
1420
uses: cicirello/generate-sitemap@v1
1521
with:
16-
base-url-path: https://github.io
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

0 commit comments

Comments
 (0)