Skip to content
Merged
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
54 changes: 54 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Publish docs

on:
push:
branches:
- main
paths:
- "docs/**"
- "examples/agentic/duelgrid/images/**"
- ".github/workflows/publish-docs.yml"
workflow_dispatch:

permissions:
contents: write

concurrency:
group: docs-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
publish:
name: Build Sphinx docs and publish static site
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Install docs dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r docs/requirements.txt

- name: Build docs
run: |
rm -rf dist/docs
python -m sphinx -W --keep-going -b html docs dist/docs
touch dist/docs/.nojekyll

- name: Publish to gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: dist/docs
force_orphan: true
enable_jekyll: false
commit_message: "docs: publish static site"
Loading