-
Notifications
You must be signed in to change notification settings - Fork 20
39 lines (39 loc) · 1.33 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
# This workflow builds and deploys the html documentation for svZeroDSolver.
name: Documentation
on: [push, pull_request]
permissions:
contents: write
jobs:
documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Make html directory
run: mkdir docs/html
- name: Build doxygen documentation
continue-on-error: true
uses: mattnotmitt/[email protected]
with:
working-directory: '.'
doxyfile-path: 'docs/cpp/Doxyfile'
enable-latex: true
- name: Install sphinx dependencies
run: |
conda create -n zerod python=3.9
conda run -n zerod pip install -e .[dev]
- name: Build sphinx documentation
continue-on-error: true
run: |
conda run -n zerod sphinx-apidoc -o docs/python/source svzerodsolver
conda run -n zerod sphinx-build -b html -d docs/python/build/doctrees docs/python/source docs/html/python
- name: Save documentation
uses: actions/upload-artifact@v3
with:
name: documentation
path: ./docs/html
- name: Deploy documentation
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/html