Skip to content

[pre-commit.ci] pre-commit autoupdate #290

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #290

Workflow file for this run

name: Docs
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Build docs (python-${{ matrix.python-version }}, ${{ matrix.os }})
strategy:
matrix:
python-version:
- "3.12"
os:
- ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
env:
UV_HTTP_TIMEOUT: 900 # max 15min to install deps
steps:
- name: Setup pandoc
uses: pandoc/actions/setup@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
# Adding cache-dependency-path for better cache invalidation
cache-dependency-path: |
pyproject.toml
cache-key: ${{ runner.os }}-${{ matrix.python-version }}-uv
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --extra docs
- name: Build docs
run: uv run mkdocs build
- name: Deploy docs
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' && github.event_name == 'push' && github.ref == 'refs/heads/master'
run: uv run mkdocs gh-deploy --force
- name: Minimize uv cache
run: uv cache prune --ci