-
-
Notifications
You must be signed in to change notification settings - Fork 14
69 lines (63 loc) · 1.61 KB
/
ci.yml
File metadata and controls
69 lines (63 loc) · 1.61 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
name: Nix Flake actions
on:
pull_request:
merge_group:
push:
branches:
- master
- main
jobs:
nix-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v5
- uses: cachix/install-nix-action@v31
- id: set-matrix
name: Generate Nix Matrix
run: |
set -Eeu
echo "matrix=$(nix eval --json '.#githubActions.matrix')" >> "$GITHUB_OUTPUT"
nix-build:
needs: nix-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v5
- uses: cachix/install-nix-action@v31
- run: nix build -L ".#${{ matrix.attr }}"
nix-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Nix
uses: cachix/install-nix-action@v31
- uses: DeterminateSystems/nix-installer-action@v19
- name: Build shell
run: nix develop -c true
- name: Test nix-unit
run: nix develop -c ./tests/tests.py
collect:
runs-on: ubuntu-latest
needs:
- nix-build
- nix-unit
steps:
- run: exit 0
deploy-pages:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: nix-unit
steps:
- uses: actions/checkout@v5
- uses: cachix/install-nix-action@v31
- name: Run build
run: nix build -L .#doc
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./result
force_orphan: true