File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,47 +3,25 @@ name: Generate Docs
33on :
44 push :
55 branches : [master]
6+ workflow_dispatch :
7+ inputs :
8+ dry_run :
9+ description : ' Dry run (no wiki push)'
10+ type : boolean
11+ default : false
612
713concurrency :
814 group : docs-${{ github.ref }}
915 cancel-in-progress : true
1016
1117jobs :
12- generate- docs :
18+ docs :
1319 runs-on : ubuntu-latest
20+ needs : [lint, test]
1421 steps :
1522 - uses : actions/checkout@v4
16-
17- - uses : actions/setup-python@v5
23+ - uses : HanSur94/wiki-gen-action@v1
1824 with :
19- python-version : " 3.12"
20-
21- - name : Install dependencies
22- run : pip install anthropic
23-
24- - name : Generate all wiki pages
25- env :
26- ANTHROPIC_API_KEY : ${{ secrets.ANTHROPIC_API_KEY }}
27- continue-on-error : true
28- run : python scripts/generate_docs.py
29-
30- - name : Push to wiki
31- env :
32- WIKI_PAT : ${{ secrets.WIKI_PAT }}
33- run : |
34- # Clone wiki repo
35- git clone https://x-access-token:${WIKI_PAT}@github.com/HanSur94/matlab-mcp-server-python.wiki.git /tmp/wiki
36-
37- # Copy all generated wiki pages
38- cp wiki/*.md /tmp/wiki/
39-
40- # Check for changes (status --porcelain catches new/untracked files too)
41- cd /tmp/wiki
42- [ -z "$(git status --porcelain)" ] && echo "No changes to wiki" && exit 0
43-
44- # Commit and push
45- git config user.name "github-actions[bot]"
46- git config user.email "github-actions[bot]@users.noreply.github.com"
47- git add *.md
48- git commit -m "docs: auto-update wiki"
49- git push
25+ anthropic_api_key : ${{ secrets.ANTHROPIC_API_KEY }}
26+ wiki_pat : ${{ secrets.WIKI_PAT }}
27+ dry_run : ${{ inputs.dry_run || 'false' }}
You can’t perform that action at this time.
0 commit comments