-
-
Notifications
You must be signed in to change notification settings - Fork 137
56 lines (46 loc) · 1.52 KB
/
build-docs.yml
File metadata and controls
56 lines (46 loc) · 1.52 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
name: CI / Docs
on:
push:
pull_request:
types: [opened, synchronize]
jobs:
docs_build:
name: "Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Get full Python version
id: full-python-version
run: python -c "import sys; print(f\"version={'-'.join(str(v) for v in sys.version_info)}\")" >> "$GITHUB_OUTPUT"
- name: Set up poetry
uses: Gr1N/setup-poetry@v9
with:
poetry-version: "2.3.1"
- name: Configure poetry
run: poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v5
id: cache
with:
path: |
~/.cache/pypoetry
~/.cache/pip
key: deps-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-docs-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
deps-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-docs-
deps-${{ runner.os }}-3.10-
- name: Install dependencies
run: poetry install --with docs
- name: Build documentation
run: |
poetry run python -m mkdocs build --clean --site-dir ./_build/html --config-file mkdocs.yml
- uses: actions/upload-artifact@v7
name: Upload docs as artifact
with:
name: docs-html
path: './_build/html'
if-no-files-found: error