-
Notifications
You must be signed in to change notification settings - Fork 26
66 lines (54 loc) · 1.66 KB
/
gh-pages.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
63
64
65
66
name: docs
on:
pull_request:
branches:
- master
- develop
push:
branches:
- develop
jobs:
test-docstrings:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
- name: Install dependencies
run: pip install -qU pydocstyle
- name: Check docstrings
# Ignoring the cached_properties because pydocstyle (sometimes?) treats them as functions.
run: pydocstyle --convention=numpy --ignore-decorators=[cached_property,property] mala
build-and-deploy-pages:
needs: test-docstrings
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # 0 fetches complete history and tags
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
- name: Install dependencies
run: |
pip install -r docs/requirements.txt
- name: Build API and docs
run: |
make -C docs apidocs
sphinx-build -W --keep-going -b html -d docs/_build/doctrees docs/source docs/_build/html
mv -v docs/_build/html public
- name: Deploy
if: ${{ github.event_name == 'push' }}
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./public