-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (34 loc) · 1 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
name: Documentation
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout github repo
uses: actions/checkout@v3
- name: Lint
uses: psf/black@stable
# Standard drop-in approach that should work for most people.
- name: Build docs
uses: ammaraskar/sphinx-action@master
with:
pre-build-command: "apt-get --allow-releaseinfo-change update -y && apt-get install -y g++ && apt-get install -y gfortran && apt-get install -y pandoc"
docs-folder: "docs/"
- name: Checkout pages branch
uses: actions/checkout@v3
with:
ref: gh-pages
path: gh-pages
- name: Commit documentation changes
run: |
cp -r docs/_build/html/* gh-pages/
cd gh-pages
touch .nojekyll
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
git push