Skip to content

Build Documentation #79

Build Documentation

Build Documentation #79

Workflow file for this run

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