-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (89 loc) · 2.58 KB
/
docs.yml
File metadata and controls
93 lines (89 loc) · 2.58 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Documentation
on:
workflow_dispatch:
push: &triggers
branches:
- main
paths:
- docs/**/*
- version.txt
pull_request: *triggers
jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wimpysworld/nothing-but-nix@main
with:
hatchet-protocol: holster
- uses: DeterminateSystems/nix-installer-action@main
- name: Check formatting
run: >
{ nix run '.#treefmt' -- docs --ci || true; } && git --no-pager diff --exit-code
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache-dependency-path: docs/package-lock.json
- name: Install npm packages
run: npm --prefix docs ci --include dev --ignore-scripts --no-audit
- name: Check links
run: npm --prefix docs run linkcheck -- --reporters junit --quiet ./ 2>/dev/null
- name: Publish link check report
uses: mikepenz/action-junit-report@v5
if: success() || failure()
with:
check_name: Link check report
report_paths: docs/junit-results.xml
fail_on_failure: true
fail_on_parse_error: true
comment: true
updateComment: true
build:
needs: check
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: wimpysworld/nothing-but-nix@main
with:
hatchet-protocol: holster
- uses: DeterminateSystems/nix-installer-action@main
- name: Build documentation
run: nix-build ./docs --arg isCI $CI
- name: Upload built documentation
uses: actions/upload-artifact@v5
with:
name: docs
path: result
deploy:
needs: build
if: success() && github.ref_name == 'main' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
id-token: write
pages: write
steps:
- uses: actions/checkout@v4
- uses: wimpysworld/nothing-but-nix@main
with:
hatchet-protocol: holster
- uses: DeterminateSystems/nix-installer-action@main
- name: Retrieve built documentation
uses: actions/download-artifact@v6
with:
name: docs
path: result
- uses: actions/configure-pages@v4
- uses: actions/upload-pages-artifact@v3
with:
path: 'result'
- uses: actions/deploy-pages@v4
id: deployment