2023-09-18 10:45:12 +02:00
|
|
|
name: Build documentation
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "main"
|
|
|
|
|
|
|
|
env:
|
|
|
|
PYTHON_VERSION: 3.9
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: "pages"
|
|
|
|
cancel-in-progress: false
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- id: checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- id: setup-python
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
|
|
|
|
|
|
- id: install-deps-and-build
|
|
|
|
name: Install dependencies and test
|
|
|
|
run: |
|
2023-09-18 10:49:08 +02:00
|
|
|
pip install -e .
|
|
|
|
pip install -e .[doc]
|
2023-09-18 10:45:12 +02:00
|
|
|
mkdocs build --site-dir build
|
|
|
|
|
|
|
|
- name: Setup Pages
|
|
|
|
id: configure-pages
|
|
|
|
uses: actions/configure-pages@v3
|
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
id: upload-artifact
|
|
|
|
uses: actions/upload-pages-artifact@v1
|
|
|
|
with:
|
|
|
|
# Upload entire repository
|
|
|
|
path: './build'
|
|
|
|
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
id: deployment
|
|
|
|
uses: actions/deploy-pages@v2
|
2023-11-21 09:09:40 +01:00
|
|
|
|
|
|
|
- name: Upload PDF
|
|
|
|
id: upload-pdf
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: document.pdf
|
|
|
|
path: site/pdf/document.pdf
|