-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (33 loc) · 1.1 KB
/
test_build.yml
File metadata and controls
42 lines (33 loc) · 1.1 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
# Build documentation and upload to gh-pages
name: Ensure documentation builds after commits
defaults:
run:
shell: bash
env:
UV_COMPILE_BYTECODE: 1
on: [push, pull_request] # Runs on all push events to any branch
jobs:
documentation:
name: Build Static Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv and Python
uses: astral-sh/setup-uv@v6
with:
python-version: 3.13
enable-cache: true
activate-environment: true
cache-dependency-glob: "requirements.txt"
- name: Install dependencies
run: uv pip install -r requirements.txt
- name: Build documentation
run: python -m mkdocs build -d ./doc_build
# Upload artifacts if in PR so reviewers can have a quick look without building documentation from the branch locally
- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: success() && github.event_name == 'pull_request'
with:
name: site-build
path: doc_build
retention-days: 5