-
Notifications
You must be signed in to change notification settings - Fork 14
53 lines (47 loc) · 1.35 KB
/
doc.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
name: Deploy documentation
on:
push:
branches:
- master
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
services:
mariadb:
image: ispyb/ispyb-pydb:latest
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install mkdocs
pip install mkdocs-material
- name: Build
run: |
mkdocs build --strict --verbose
- name: Create OpenAPI spec
env:
ISPYB_ENVIRONMENT: ci
run: |
sudo apt-get update && sudo apt-get install -y libldap2-dev libsasl2-dev
pip install -r requirements.txt
pip install -e . --no-deps
python scripts/generate_apispec.py
mkdir public/api
- name: Run redoc
uses: seeebiii/redoc-cli-github-action@v10
with:
args: "bundle -o public/api/index.html openapi.json"
- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: public