Skip to content

Commit 2256b92

Browse files
committed
first attempt at gh-pages
1 parent b4b4642 commit 2256b92

File tree

4 files changed

+60
-0
lines changed

4 files changed

+60
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: github pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- name: Install pandoc and doxygen
16+
run: |
17+
sudo apt install pandoc doxygen
18+
19+
- name: Setup Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.8'
23+
24+
- name: Cache pip
25+
uses: actions/cache@v2
26+
with:
27+
# this path is specific to Ubuntu
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
30+
restore-keys: |
31+
${{ runner.os }}-pip-
32+
33+
- name: Install dependencies
34+
run: pip install -r ./requirements.txt
35+
36+
- name: Build docs
37+
run: ./deploy_docs_action.sh
38+
39+
- name: Deploy
40+
uses: peaceiris/actions-gh-pages@v3
41+
with:
42+
github_token: ${{ secrets.GITHUB_TOKEN }}
43+
publish_dir: ./out
44+
keep_files: true

.nojekyll

Whitespace-only changes.

deploy_docs_action.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -e # Exit with nonzero exit code if anything fails
3+
4+
mkdir out
5+
6+
# Build the Sphinx documentation
7+
cd docs
8+
make html
9+
cd ../
10+
11+
mkdir -p out/
12+
mv docs/build/html/* out/

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
matplotlib>=2.1.0
2+
sphinx_rtd_theme
3+
Sphinx
4+
nbsphinx>=0.3.1

0 commit comments

Comments
 (0)