-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (61 loc) · 1.6 KB
/
docs.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
67
68
name: Documentation
on:
workflow_dispatch:
branches:
- develop
pull_request:
types: [opened, synchronize, ready_for_review]
branches:
- develop
push:
branches:
- develop
jobs:
build_docs:
name: Build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
auto-activate-base: false
- name: Switch to gcc-10 on linux
if: runner.os == 'Linux'
run: |
sudo apt install gcc-10 g++-10 cpp-10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
- name: Install dependencies
run: |
cd extern/
bash ./download.sh
cd ../
conda env create --name build-env --file environment.yml
conda activate build-env
python setup.py develop
shell: bash -l {0}
- name: Build documentation
run: |
conda activate build-env
cd docs
make html
shell: bash -l {0}
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/_build/html
deploy:
name: Deploy
if: ${{ github.event_name == 'push' }}
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-20.04
needs: build_docs
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1