Skip to content

Commit 4bc4fbb

Browse files
HanSur94claude
andcommitted
ci: switch docs workflow to wiki-gen-action
Replaces the custom generate_docs.py + inline push script with the reusable HanSur94/wiki-gen-action@v1 GitHub Action. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 11dbd13 commit 4bc4fbb

1 file changed

Lines changed: 12 additions & 34 deletions

File tree

.github/workflows/docs.yml

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,25 @@ name: Generate Docs
33
on:
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

713
concurrency:
814
group: docs-${{ github.ref }}
915
cancel-in-progress: true
1016

1117
jobs:
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' }}

0 commit comments

Comments
 (0)