File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Documentation Index
2+
3+ on :
4+ push :
5+ paths :
6+ - ' docs/**'
7+ branches :
8+ - main
9+ repository_dispatch :
10+ types : [build_docs]
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+ permissions :
16+ contents : write
17+ steps :
18+ - uses : actions/checkout@v3
19+
20+ - name : Setup Node.js
21+ uses : actions/setup-node@v3
22+ with :
23+ node-version : ' 18'
24+
25+ - name : Build docs
26+ run : node build-docs.js
27+
28+ - name : Check for changes
29+ id : check_changes
30+ run : |
31+ git diff --quiet index.json || echo "changes=true" >> $GITHUB_OUTPUT
32+
33+ - name : Commit and push if changed
34+ if : steps.check_changes.outputs.changes == 'true'
35+ run : |
36+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
37+ git config --local user.name "github-actions[bot]"
38+ git add index.json
39+ git commit -m "Update documentation index"
40+ git push
You can’t perform that action at this time.
0 commit comments