-
Notifications
You must be signed in to change notification settings - Fork 13
51 lines (42 loc) · 1.37 KB
/
build_deploy_pdoc.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
name: API docs / pdoc3
# We should trigger this from an upload event
on:
push: # This is not really a great idea
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install numpy
pip install scipy
pip install Cython
pip install pdoc3
- name: Install latest stripy
run: |
pip install .
- name: Build docs with pdoc
shell: bash -l {0}
run: |
VERSION=`python setup.py --version`
echo "VERSION=$(echo $VERSION)" >> $GITHUB_ENV
mkdir -p docs
cd docs
pdoc --config latex_math=True --html -o api --force stripy
# Here we can add an action to build the jupyter book to a different directory
# and then they can be uploaded together. The jupyter book can contain a link to the
# API docs.
# Note deploy key needs the ----BEGIN ... KEY---- lines too
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_dir: docs/
publish_dir: docs/api/stripy