Skip to content

Update check.yml

Update check.yml #91

Workflow file for this run

name: documentation
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
doctest:
name: Test if documentation can be rendered
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
version: "0.11.16"
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras
- name: Run doctest
run: uv run sphinx-build -b doctest doc .
docdeploy:
name: Render the documentation and push it to gh-pages
runs-on: ubuntu-latest
needs: doctest
if: ${{github.ref == 'refs/heads/main'}}
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
version: "0.11.16"
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras
- name: Sphinx build
run: uv run sphinx-build doc _build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true