-
Notifications
You must be signed in to change notification settings - Fork 42
47 lines (44 loc) · 1.14 KB
/
document.yml
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
name: Deploy Documentation
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
actions: read
concurrency:
group: nyx-main-document
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 120
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Install Nix
if: steps.check.outputs.cached != 'true'
uses: cachix/install-nix-action@v30
with:
extra_nix_config: "accept-flake-config = true"
- name: Checkout
uses: actions/checkout@v4
- name: Build
id: build
run: |
set -euo pipefail
mkdir result
nix develop \
--override-input chaotic "github:chaotic-cx/nyx/${GITHUB_SHA}" \
./maintenance#document -c 'true' \
| \
xargs -i@ cp @ result/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'result'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4