-
Notifications
You must be signed in to change notification settings - Fork 8
65 lines (56 loc) · 1.53 KB
/
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
63
64
65
name: Documentation
on:
push:
release:
types:
- published
jobs:
create-documentation:
name: Build documentation HTML
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Mamba environment for Python
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ./environment.yml
environment-name: ocsmesh-env
- name: Install dependencies
shell: bash -l {0}
run: |
python ./setup.py install_jigsaw
pip install .[documentation]
- name: Retrieve latest version from Git tags
uses: mtkennerly/dunamai-action@v1
with:
env-var: VERSION
args: --style semver
- name: Build documentation site with Sphinx
shell: bash -l {0}
run: |
cd docs
make html
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: documentation_built
path: docs/build/html
deploy-documentation:
name: deploy to GitHub Pages
runs-on: ubuntu-latest
needs: [ create-documentation ]
if: github.event_name == 'release'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Download documentation for deployment
uses: actions/download-artifact@v4
with:
name: documentation_built
path: docs/build/html
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: docs/build/html