forked from MeasureTransport/MParT
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.74 KB
/
build-doc.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
name: docs
on:
push:
branches:
- main
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Use Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: "3.8"
activate-environment: "test"
- name: Checkout MParT
uses: actions/checkout@v1
- uses: shrink/actions-docker-extract@v1
id: extract
with:
image: quay.io/measuretransport/mpart_examples:latest
path: /home/bayes/examples/python/.
- name: Move notebooks into documentation
run: |
mkdir ${{ github.workspace }}/docs/source/tutorials/python
cp ${{ steps.extract.outputs.destination }}/*.nbconvert.ipynb ${{ github.workspace }}/docs/source/tutorials/python/
for file in ${{ github.workspace }}/docs/source/tutorials/python/*.nbconvert.ipynb; do mv "${file}" "${file/nbconvert./}"; done
- name: Install sphinx extensions
shell: bash -l {0}
run: conda install -c conda-forge doxygen pygments sphinx sphinx-design breathe pydata-sphinx-theme nbsphinx jupytext pandoc ipykernel nbconvert
- name: Run CMake
shell: bash -l {0}
run: |
cd ${{ github.workspace }}
mkdir build && cd build
cmake -DKokkos_ENABLE_THREADS=ON -DKokkos_ENABLE_SERIAL=ON -DPYTHON_EXECUTABLE=`which python` -DMPART_BUILD_EXAMPLES=OFF ../
- name: Build Docs
shell: bash -l {0}
run: |
cd ${{ github.workspace }} && cd build
make sphinx
- name: Push to gh-pages
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/docs/sphinx/