Skip to content

utils funkction ported to inspector #63

utils funkction ported to inspector

utils funkction ported to inspector #63

Workflow file for this run

name: Build Documentation
on:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
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.10
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.10"
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
# circumvent bug python-poetry/poetry#7694 in version 1.4.1
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with docs
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install pandoc
uses: nikeee/setup-pandoc@v1
with:
pandoc-version: '2.19.1'
#----------------------------------------------
# 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
if: ${{ github.event_name == 'push' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: gh-pages