Skip to content

add gh-action

add gh-action #1

Workflow file for this run

name: documentation
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
env:
IS_GITHUB_RUNNER: "true"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install dependencies
run: |
python -m pip install uv --upgrade
python -m uv pip install --system .[docs]
- name: Sphinx build
run: |
sphinx-build -b html docs/ docs/_build/html -j auto
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
# force_orphan: true