Skip to content

fix: documentation

fix: documentation #8

Workflow file for this run

name: Build and Deploy Documentation
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'pyproject.toml'
- '.github/workflows/documentation.yml'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Cache Poetry virtual environment
uses: actions/cache@v4
with:
path: |
~/.cache/pypoetry
~/.local/share/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}-v1
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Dependencies
run: |
poetry install
- name: Build Documentation
run: |
poetry run sphinx-build -b html docs/source docs/build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build