45 lines
1021 B
YAML
Raw Normal View History

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
2024-05-31 23:39:07 +02:00
paths:
- 'docs/**'
- pyproject.toml
- poetry.lock
2023-03-27 21:37:25 +03:00
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
2024-05-31 23:39:07 +02:00
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run tests
2024-06-01 00:15:30 +02:00
run: nix develop --command -- poetry install && poetry 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 }}
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