-
Notifications
You must be signed in to change notification settings - Fork 19
46 lines (37 loc) · 1.16 KB
/
docs-build.yaml
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
name: Sphinx & deploy - commit to gh-pages
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Add conda to system path
run: echo $CONDA/bin >> $GITHUB_PATH
- name: Install latex for math display
run: |
sudo apt-get update -y
sudo apt-get install -y texlive-latex-recommended
- name: Install python dependencies
run: |
conda install lammps -c conda-forge
python -m pip install -r docs/requirements.txt
export PYTHONPATH="${{github.workspace}}:$PYTHONPATH"
- name: Build main package
run: make libs
- name: Build docs
working-directory: ${{github.workspace}}/docs
run: make html
- name: Commit to gh-pages branch
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html