generated from JacksonBurns/blank-python-project
-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (45 loc) · 1.25 KB
/
gen_docs.yml
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
49
50
name: Generate Docs
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
generate:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: '3.10'
- name: Install Dependencies
run: |
git config user.name github-actions
git config user.email github-actions@github.com
python -m pip install -e .[molecules]
python -m pip install sphinx sphinx-rtd-theme m2r mistune==0.8.4
- uses: actions/checkout@v3
with:
ref: docs
- name: Update Docs to Main
run: |
git fetch --all
git reset --hard origin/main
- name: Generate Documentation
run: |
cd docs
rm *.html *.doctree || true
sphinx-apidoc -f -o . ..
make clean
make html
cp -r _build/html/* .
cp -r _build/doctrees/* .
echo "" > .nojekyll
- name: Push to Docs Branch
run: |
git add .
git commit -m "Automated Docs Update" -a || true
git push -f