-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (48 loc) · 1.35 KB
/
documentation.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
47
48
name: Docs
on: [push, pull_request, workflow_dispatch]
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt-get -yqq install pandoc
pip install --upgrade pip setuptools
pip install ipykernel ipython==8.12.0 jupyter
pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc ipython-genutils
pip install .
- name: Setup tutorials
run: |
ls
cp tutorials/*.ipynb ./docs
cp tutorials/*.dat ./docs
cp -r tutorials/input ./docs
ls docs
- name: Sphinx build
run: |
cd docs
make clean
make html
cd -
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
name: github-pages
path: docs/_build/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' }}
with:
publish_branch: gh-pages
keep_files: true
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html/
force_orphan: true