-
Notifications
You must be signed in to change notification settings - Fork 44
60 lines (51 loc) · 1.36 KB
/
Copy pathdeploy-docs.yml
File metadata and controls
60 lines (51 loc) · 1.36 KB
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
name: Build and Deploy docs
on:
pull_request:
push:
branches:
- master
release:
types:
- published
# Deny all permissions by default
permissions: {}
jobs:
build-docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Mamba
uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0
with:
environment-name: TEST
create-args: >-
python=3
numpy>1.13.3
sphinx
- name: Build environment
shell: bash -l {0}
run: |
python -m pip install -e . --no-deps --force-reinstall
- name: Get the version
shell: bash -l {0}
id: get_version
run: echo "name=VERSION::$(python setup.py --version)" >> $GITHUB_OUTPUT
- name: Build documentation
shell: bash -l {0}
run: |
set -e
pushd docs
make html linkcheck O=-W
popd
- name: Deploy
if: success() && github.event_name == 'release'
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html