Skip to content

Commit 464f96f

Browse files
Create update-docs-index.yml
1 parent 3140dda commit 464f96f

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Auto‑Generate Docs Index
2+
3+
on:
4+
push:
5+
paths:
6+
- "docs/**"
7+
- "scripts/generateDocsIndex.js"
8+
9+
jobs:
10+
update-index:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Setup Node
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 18
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Generate docs index
26+
run: npm run generate-docs-index
27+
28+
- name: Commit and push changes
29+
run: |
30+
git config user.name "GitHub Actions Bot"
31+
git config user.email "bot@github.com"
32+
git add docs-index.html
33+
git commit -m "Auto-update docs index" || echo "No changes to commit"
34+
git push

0 commit comments

Comments
 (0)