Skip to content

Commit 83cf9e3

Browse files
Create main.yaml
1 parent 55ab965 commit 83cf9e3

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/main.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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

0 commit comments

Comments
 (0)