-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (53 loc) · 1.78 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
name: Build and Deploy docs
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types:
- created
permissions:
contents: write
jobs:
docs:
name: build and deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Set system to non-interactive mode
run: export DEBIAN_FRONTEND=noninteractive
- name: install dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y --force-yes -qq build-essential python3-dev
pip install sphinx
pip install sphinx-rtd-theme
pip install sphinx-multiversion
- name: build code
run: |
mkdir -p build
cmake -DSINGULARITY_BUILD_PYTHON=ON \
-DSINGULARITY_USE_SPINER=ON \
-DSINGULARITY_USE_SPINER_WITH_HDF5=OFF \
-DSINGULARITY_FORCE_SUBMODULE_MODE=ON \
-B build .
cmake --build build
sudo cmake --install build
- name: build docs
run: |
cd doc/sphinx
PYVERSION=$(python -c "from platform import python_version; print('.'.join(python_version().split('.')[:2]))")
export PYTHONPATH=/usr/local/lib/python${PYVERSION}/site-packages:$PYTHONPATH
make multiversion
- name: Deploy
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
uses: peaceiris/actions-gh-pages@v3.7.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/sphinx/_build/html
force_orphan: true