Skip to content

Commit 3628b54

Browse files
committed
Add documentation action
1 parent eee9011 commit 3628b54

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/workflows/documentation.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [ 'master' ]
6+
pull_request:
7+
8+
workflow_dispatch:
9+
10+
# Compile the docs and deploy to GitHub pages
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# Checks out the repository
17+
- uses: actions/checkout@v3
18+
with:
19+
ref: 'master'
20+
21+
- name: Install pandoc
22+
run: sudo apt-get install -y pandoc
23+
24+
# Upgrade pip
25+
- name: Upgrade pip
26+
run: |
27+
# install pip=>20.1 to use "pip cache dir"
28+
python3 -m pip install --upgrade pip
29+
# Cache dependencies
30+
- name: Get pip cache dir
31+
id: pip-cache
32+
run: echo "::set-output name=dir::$(pip cache dir)"
33+
34+
# Install sphinx
35+
- name: Install dependencies
36+
run: python3 -m pip install -r ./docs/requirements.txt
37+
38+
# Make docs
39+
- name: Build docs
40+
run: cd docs && make html
41+
42+
# Deploy
43+
- name: Deploy
44+
uses: peaceiris/actions-gh-pages@v3
45+
with:
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
publish_dir: ./docs/_build/html/

docs/requirements.txt

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
recommonmark
2+
sphinx-rtd-theme==1.0.0
3+
Sphinx==5.1.*
4+
nbsphinx==0.8.*
5+
sphinx-rtd-theme==1.0.*
6+
sphinx-argparse
7+
sphinxcontrib-applehelp==1.0.*
8+
sphinxcontrib-devhelp==1.0.*
9+
sphinxcontrib-htmlhelp==2.0.*
10+
sphinxcontrib-jsmath==1.0.*
11+
sphinxcontrib-qthelp==1.0.*
12+
sphinxcontrib-serializinghtml==1.1.*

0 commit comments

Comments
 (0)