2024-01-14 18:58:08 +01:00
|
|
|
name: Deploy Documentation
|
|
|
|
|
|
|
|
on:
|
2024-01-14 19:22:51 +01:00
|
|
|
workflow_dispatch:
|
2024-01-14 18:58:08 +01:00
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-website:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-02-02 15:13:08 +01:00
|
|
|
- uses: actions/checkout@v4
|
2024-01-14 18:58:08 +01:00
|
|
|
- uses: DeterminateSystems/nix-installer-action@v9
|
2024-02-02 15:13:08 +01:00
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@v3
|
2024-01-14 18:58:08 +01:00
|
|
|
- name: Build documentation
|
2024-01-15 14:35:57 +01:00
|
|
|
run: nix build .#docs --print-build-logs
|
2024-01-14 18:58:08 +01:00
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-pages-artifact@v1
|
|
|
|
with:
|
|
|
|
path: ./result
|
|
|
|
deploy:
|
2024-01-14 18:59:38 +01:00
|
|
|
needs: build-website
|
2024-01-14 18:58:08 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
steps:
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
id: deployment
|
|
|
|
uses: actions/deploy-pages@v2
|