-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.78 KB
/
test-docs-gen.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
53
54
55
56
57
58
59
60
61
name: "Pull Request Docs Check"
on:
- pull_request
env:
os: ubuntu-latest
python-version: '3.10'
poetry-version: '1.8.3'
poetry-home: ''
poetry-path: ''
poetry-cache-paths: |
~/.local/share/pypoetry
~/.local/bin/poetry
poetry-cache-key-fmt: 'poetry-{0}-{1}-python-{2}'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ env.python-version }}
- name: Set up Poetry ${{ env.poetry-version }}
id: setup-poetry
uses: ./.github/actions/setup-poetry
with:
cache-path: ${{ env.poetry-cache-paths }}
cache-key: ${{ format(env.poetry-cache-key-fmt, env.poetry-version, env.os, steps.setup-python.outputs.python-version) }}
poetry-version: ${{ env.poetry-version }}
poetry-home: ${{ env.poetry-home }}
poetry-path: ${{ env.poetry-path }}
- name: Set up Poetry dependencies
id: setup-poetry-dependencies
uses: ./.github/actions/setup-poetry-dependencies
with:
cache-key: ${{ format(env.venv-cache-key-fmt, env.os, steps.setup-python.outputs.python-version, hashFiles('**/poetry.lock')) }}
python-version: ${{ steps.setup-python.outputs.python-version }}
poetry-install-args: --no-interaction --with docs
- name: Sphinx build
run: |
${{ steps.setup-poetry-dependencies.outputs.venv-activate }}
python -m sphinx docs docs/build
# Great extra actions to compose with:
# Create an artifact of the html output.
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/build