Repository navigation
66 lines (58 loc) · 1.88 KB
/
Copy pathdocs.yml
File metadata and controls
66 lines (58 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Publish documentation
on:
push:
branches: [main]
paths:
- "docs/**"
- "flake.nix"
- "flake.lock"
- ".github/workflows/docs.yml"
- ".github/actions/nix-setup/action.yml"
workflow_dispatch:
# No token by default; each job opts into exactly the scopes it needs.
permissions: {}
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/nix-setup
with:
cachix-cache: ${{ vars.CACHIX_CACHE }}
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
# `packages.docs` runs `mkdocs build --strict`, so a broken link or a page
# missing from the nav fails here. `cp -rL` dereferences the store
# symlink, and the chmod makes the copy writable for the upload action.
- name: Build documentation
run: |
set -euo pipefail
nix build .#docs --print-build-logs
cp -rL result public
chmod -R u+w public
- uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: public
deploy:
name: Deploy documentation
needs: build
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
pages: write # Publish the uploaded artifact to GitHub Pages.
id-token: write # Authenticate the deployment with GitHub OIDC.
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4