2023-03-27 21:37:25 +03:00
|
|
|
name: Build documentation
|
2024-03-13 13:43:06 +01:00
|
|
|
|
2023-03-27 21:37:25 +03: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 13:43:06 +01:00
|
|
|
uses: actions/checkout@v4
|
2023-03-27 21:37:25 +03: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 17:11:00 +03:00
|
|
|
run: pip install -r docs/requirements.txt
|
2023-03-27 21:37:25 +03:00
|
|
|
- name: Build docs
|
2023-04-01 22:23:48 +03:00
|
|
|
run: mkdocs build --strict
|
2023-03-27 21:37:25 +03:00
|
|
|
- name: Upload artifact
|
2024-03-22 19:50:35 +01:00
|
|
|
uses: actions/upload-pages-artifact@v3
|
2023-03-27 21:37:25 +03:00
|
|
|
with:
|
|
|
|
path: ./site
|
2024-03-13 13:43:06 +01:00
|
|
|
|
2023-03-27 21:37:25 +03:00
|
|
|
deploy:
|
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
2024-03-22 19:50:35 +01:00
|
|
|
permissions:
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
2023-03-27 21:37:25 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
steps:
|
2024-03-22 19:50:35 +01:00
|
|
|
- name: Configure Pages
|
|
|
|
uses: actions/configure-pages@v4
|
2023-03-27 21:37:25 +03:00
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
id: deployment
|
2024-03-13 13:43:06 +01:00
|
|
|
uses: actions/deploy-pages@v4
|