Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/generate-llm-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Generate Wiki Docs (LLM)

on:
push:
branches: [main]
paths:
- 'libs/**/*.m'
- 'examples/**/*.m'
- 'docs/**/*.md'
- 'README.md'
- 'scripts/generate_llm_docs.py'
workflow_dispatch:

permissions:
contents: write

jobs:
generate:
name: Generate Wiki Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout main repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: pip install anthropic

- name: Clone wiki repo
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git clone "https://x-access-token:${GITHUB_TOKEN}@github.com/HanSur94/FastPlot.wiki.git" wiki

- name: Generate LLM docs
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: python3 scripts/generate_llm_docs.py

- name: Push updated wiki
run: |
cd wiki
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
if git diff --cached --quiet; then
echo "No documentation changes"
else
git commit -m "docs: auto-update wiki pages via LLM from source code"
git push
echo "Wiki LLM docs updated"
fi
Loading
Loading