-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (60 loc) · 1.63 KB
/
ci.yaml
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
on:
pull_request:
push:
branches:
- main
jobs:
check:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v16
- run: nix flake check --show-trace --print-build-logs --impure
release:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'mirkolenz' && github.event_name == 'push' }}
needs: check
permissions:
contents: write
environment:
name: release
url: https://github.com/mirkolenz/flocken/releases/tag/${{ steps.release.outputs.git-tag }}
outputs:
ref: ${{ steps.release.outputs.git-head }}
released: ${{ steps.release.outputs.released }}
steps:
- uses: actions/checkout@v4
- uses: cihelper/action-semanticrelease-generic@v1
id: release
build-docs:
runs-on: ubuntu-latest
needs: release
if: ${{ needs.release.outputs.released == 'true' }}
permissions:
contents: read
pages: read
environment: github-pages
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.release.outputs.ref }}
- uses: actions/configure-pages@v5
- uses: DeterminateSystems/nix-installer-action@v16
- run: nix build .#docs
- uses: actions/upload-pages-artifact@v3
with:
path: ./result
deploy-docs:
runs-on: ubuntu-latest
needs: build-docs
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- uses: actions/deploy-pages@v4
id: deploy