-
Notifications
You must be signed in to change notification settings - Fork 13
62 lines (52 loc) · 1.72 KB
/
api-documentation.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
62
name: Generate API documentation
on:
push:
branches:
- development
paths-ignore:
- 'file_formats/**'
- 'licenses/**'
- 'schemas/**'
- 'templates/**'
- 'terms/**'
- 'tests/**'
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install openapi-spec-validator
python -m pip install -r requirements.txt
- name: Create directory for API documentation
run: |
mkdir build
ln -s . rules_uu
- name: Generate Yoda core API documentation
run: |
export PYTHONPATH="${PYTHONPATH}:."
python tools/api/generate-openapi.py rules_uu --core > build/api_core.json
- name: Validate Yoda core API documentation
run: |
openapi-spec-validator build/api_core.json
- name: Generate Yoda module API documentation
run: |
export PYTHONPATH="${PYTHONPATH}:."
python tools/api/generate-openapi.py rules_uu --module datarequest > build/api_datarequest.json
python tools/api/generate-openapi.py rules_uu --module deposit > build/api_deposit.json
- name: Validate Yoda module API documentation
run: |
openapi-spec-validator build/api_datarequest.json
openapi-spec-validator build/api_deposit.json
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: build/