Files
bpf-developer-tutorial/.github/workflows/auto-generate-docs.yml
云微 37375ff87e docs: add generated tutorial compatibility matrix (#212)
* docs: declare tutorial compatibility requirements

* docs: generate tutorial compatibility matrix

* fix: correct BPF Arena minimum kernel

* refactor: simplify compatibility validation

---------

Co-authored-by: LinuxDev9002 <i@littlefisher.me>
2026-07-14 05:00:48 -07:00

52 lines
1.4 KiB
YAML

name: Auto Generate Documentation
on:
push:
branches: [main]
paths:
- 'src/**/README.md'
- 'src/**/README.zh.md'
- 'src/**/.config'
- 'scripts/generate_toc.py'
- 'scripts/generate_compatibility.py'
- 'scripts/*.template'
workflow_dispatch:
permissions:
contents: write
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Generate documentation
run: |
python3 scripts/generate_toc.py
python3 scripts/generate_compatibility.py
- name: Check for changes
id: check_changes
run: |
git diff --quiet || echo "has_changes=true" >> $GITHUB_OUTPUT
- name: Commit and push changes
if: steps.check_changes.outputs.has_changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add README.md README.zh.md src/SUMMARY.md src/SUMMARY.zh.md src/compatibility.md src/compatibility.zh.md
git commit -m "docs: auto-generate documentation"
git push