-
Notifications
You must be signed in to change notification settings - Fork 9
47 lines (38 loc) · 1021 Bytes
/
sub_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
name: (sub) Documentation check
defaults:
run:
shell: bash
on:
workflow_call:
inputs:
python_version:
description: A version of Python to install
type: string
required: true
jobs:
documentation:
name: Verify if generated API documentation is up to date
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python_version }}
- name: Install Poetry
uses: Gr1N/setup-poetry@v8
- name: Create Poetry venv
run: |
poetry env use ${{ inputs.python_version }}
poetry install
- name: Generate API docs
run: poetry run make documentation
- name: Check if documentation needs updating
run: |
if [ "$(git status --porcelain)" ]; then
git status
exit 1
else
exit 0
fi