Skip to content

fix: doc fixes

fix: doc fixes #147

Workflow file for this run

name: OpenAPI Bundle
on:
push:
branches: ["main"]
paths:
- ".github/workflows/openapi-bundle.yml"
- "docs/openapi/**"
- "!docs/openapi/openapi.json"
pull_request:
paths:
- "docs/openapi/**"
- "!docs/openapi/openapi.json"
permissions:
contents: write
jobs:
bundle-openapi:
name: Bundle OpenAPI Spec
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Configure Git
run: |
git config user.name "GitHub Actions Bot"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Install dependencies
run: pip install pyyaml
- name: Bundle OpenAPI spec
working-directory: ./docs/openapi
run: python bundle.py
- name: Commit and push changes
if: github.event_name == 'push'
run: |
CURRENT_BRANCH="${GITHUB_REF_NAME:-main}"
git add docs/openapi/openapi.json
if git diff --staged --quiet; then
echo "No changes to commit"
exit 0
fi
git commit -m "chore: regenerate openapi.json --skip-pipeline"
git push origin "$CURRENT_BRANCH"