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 : Auto Documentation Generation
2+
3+ on :
4+ schedule :
5+ # '30 8' = 08:30 UTC | '*' = every day/month | '1' = Monday
6+ - cron : ' 30 8 * * 1'
7+ workflow_dispatch : # Allows you to trigger it manually via the Actions tab
8+
9+ # Added permissions to allow the bot to push code
10+ permissions :
11+ contents : write
12+
13+ jobs :
14+ docgen :
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v3
20+ with :
21+ fetch-depth : 0
22+
23+ - name : Setup Node.js
24+ uses : actions/setup-node@v3
25+ with :
26+ node-version : ' 20.19.4'
27+ registry-url : ' https://registry.npmjs.org'
28+
29+ - name : Install dependencies
30+ run : npm install --legacy-peer-deps
31+
32+ - name : Generate documentation
33+ run : npm run docgen
34+
35+ - name : Commit and push documentation updates
36+ run : |
37+ git config user.name "${{ github.actor }}"
38+ git config user.email "${{ github.actor }}@users.noreply.github.com"
39+
40+ # Add only the specific file
41+ git add static/typedoc/typedoc.json
42+
43+ # Only commit if there are actually changes to that file
44+ if git diff --staged --quiet; then
45+ echo "No changes to documentation. Skipping push."
46+ else
47+ git commit -m "chore: auto-update generated documentation [skip ci]"
48+ git push origin main
49+ fi
You can’t perform that action at this time.
0 commit comments