-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (44 loc) · 1.28 KB
/
build_docs.yaml
File metadata and controls
53 lines (44 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Docs
on:
push:
branches:
- master
pull_request:
jobs:
docs:
name: Docs (python-${{ matrix.python-version }}, ${{ matrix.os }})
strategy:
matrix:
python-version:
- "3.12"
os:
- ubuntu-latest
- macos-latest
- windows-latest
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Setup pandoc
uses: pandoc/actions/setup@v1
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install the project
run: uv sync
- name: Build docs
run: uv run mkdocs build
# Only deploy on ubuntu-latest with Python 3.13 when pushing to master
- name: Deploy docs
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' && 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