Fix for documentation not generated correctly #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate documentation and deploy to GitHub pages | |
on: | |
# Documentation can be either manually updated or is automatically updated when a new release is created | |
workflow_dispatch: | |
push: | |
tags: | |
- "[0-9]+\\.[0-9]+\\.[0-9]+" | |
- "[0-9]+\\.[0-9]+\\.[0-9]+a[0-9]+" | |
- "[0-9]+\\.[0-9]+\\.[0-9]+b[0-9]+" | |
- "[0-9]+\\.[0-9]+\\.[0-9]+rc[0-9]+" | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
deploy: | |
name: Build and deploy documentation site | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deploy.outputs.page_url }} # Output URL after the workflow has finished | |
steps: | |
# Checkout repository including submodules | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
# Setup Python 3.9 | |
- name: Setup Python | |
id: python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
# Install dependencies using Poetry | |
- uses: Gr1N/setup-poetry@v9 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | |
- run: poetry --version | |
- run: poetry install | |
# Build documentation to ./site/ directory | |
- name: Build Documentation | |
id: build | |
run: poetry run mkdocs build | |
# Upload artifact from the ./site/ directory using the expected format for GitHub Pages | |
- name: Upload Artifact | |
id: upload | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./site/ | |
# Use previously uploaded artifact to deploy to GitHub Pages | |
- name: Deploy | |
id: deploy | |
uses: actions/deploy-pages@v4 |