-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (53 loc) · 1.82 KB
/
docs_pages.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
51
52
53
54
55
name: Build Documentation
on:
workflow_call:
workflow_dispatch:
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3
- name: Set up python 3.11
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.11"
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
run: pipx install poetry
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
run: poetry install --no-interaction
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install pandoc
uses: nikeee/setup-pandoc@v1
with:
pandoc-version: '3.1.3'
#----------------------------------------------
# run sphinx
#----------------------------------------------
- name: Build documentation
run: |
mkdir gh-pages
touch gh-pages/.nojekyll
cd docs/
poetry run sphinx-build -b html . _build
cp -r _build/* ../gh-pages/
#----------------------------------------------
# deploy to gh-pages
#----------------------------------------------
- name: Deploy documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: gh-pages