-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (53 loc) · 1.64 KB
/
Copy pathdocs.yml
File metadata and controls
67 lines (53 loc) · 1.64 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Docs
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
env:
JUSTFILE: ${{ github.workspace }}/pipeline.just
concurrency:
group: docs-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Python API docs
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Load CI versions
shell: bash
run: cat "$GITHUB_WORKSPACE/.github/ci-versions.env" >> "$GITHUB_ENV"
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.CI_RUST }}
- name: Cache Rust build
uses: Swatinem/rust-cache@v2
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.CI_PYTHON }}
cache: pip
cache-dependency-path: |
bindings/python/docs/requirements.txt
bindings/python/pyproject.toml
- name: Create virtual environment
run: |
python -m venv .venv
echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> "$GITHUB_ENV"
echo "$GITHUB_WORKSPACE/.venv/bin" >> "$GITHUB_PATH"
- name: Install documentation dependencies
working-directory: bindings/python
run: |
pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Install maturin and Python build dependencies
run: pip install -r requirements.txt
- name: Setup just
uses: extractions/setup-just@v3
- name: Build documentation
run: just --justfile "$JUSTFILE" build-python-docs