Files
g0v0-server/.github/workflows/generate-configuration-doc.yml
dependabot[bot] 42f1d53d3e chore(deps): bump actions/checkout from 5 to 6 (#84)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-23 18:06:54 +08:00

57 lines
1.4 KiB
YAML

name: Generate configuration Docs to Wiki
on:
push:
branches:
- main
paths:
- "app/config.py"
- "scripts/generate_config_doc.py"
workflow_dispatch:
permissions:
contents: write
jobs:
generate-wiki:
runs-on: ubuntu-latest
steps:
- name: Checkout main repository
uses: actions/checkout@v6
with:
path: project
- name: Checkout repo
uses: actions/checkout@v6
with:
repository: ${{ github.repository }}.wiki
token: ${{ secrets.GITHUB_TOKEN }}
path: wiki
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pydantic pydantic-settings
- name: Generate Markdown
run: |
cd project
python ./scripts/generate_config_doc.py ${{ github.sha }} > ../wiki/Configuration.md
- name: Commit and push to Wiki
run: |
cd wiki
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Update configuration docs from Actions [skip ci]" || echo "No changes"
git push origin master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}