-
Notifications
You must be signed in to change notification settings - Fork 13
52 lines (41 loc) · 1.11 KB
/
build-docs.yml
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
name: docs
on:
push:
branches:
- master
workflow_dispatch:
jobs:
documentation:
runs-on: ubuntu-latest
env:
UV_CACHE_DIR: /tmp/.uv-cache
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python
uses: actions/setup-python@v5
- name: Cache folder for uv
uses: actions/cache@v4
with:
path: /tmp/.uv-cache
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- name: Install dependencies
run: |
uv sync --all-extras --dev
- name: Build pages
working-directory: docs
run: |
uv run make html
- name: Minimize uv cache
run: uv cache prune --ci
- name: Deploy pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html