2023-03-27 18:37:25 +00:00
|
|
|
name: Build documentation
|
2024-03-13 12:43:06 +00:00
|
|
|
|
2023-03-27 18:37:25 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-03-13 12:43:06 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-03-27 18:37:25 +00:00
|
|
|
- name: Install python
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: 3.x
|
|
|
|
- name: Setup cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
key: ${{ github.ref }}
|
|
|
|
path: .cache
|
|
|
|
- name: Setup dependencies
|
2023-11-29 14:11:00 +00:00
|
|
|
run: pip install -r docs/requirements.txt
|
2023-03-27 18:37:25 +00:00
|
|
|
- name: Build docs
|
2023-04-01 19:23:48 +00:00
|
|
|
run: mkdocs build --strict
|
2023-03-27 18:37:25 +00:00
|
|
|
- name: Upload artifact
|
2024-03-22 18:50:35 +00:00
|
|
|
uses: actions/upload-pages-artifact@v3
|
2023-03-27 18:37:25 +00:00
|
|
|
with:
|
|
|
|
path: ./site
|
2024-03-13 12:43:06 +00:00
|
|
|
|
2023-03-27 18:37:25 +00:00
|
|
|
deploy:
|
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
2024-03-22 18:50:35 +00:00
|
|
|
permissions:
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
2023-03-27 18:37:25 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
steps:
|
2024-03-22 18:50:35 +00:00
|
|
|
- name: Configure Pages
|
|
|
|
uses: actions/configure-pages@v4
|
2023-03-27 18:37:25 +00:00
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
id: deployment
|
2024-03-13 12:43:06 +00:00
|
|
|
uses: actions/deploy-pages@v4
|