-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (29 loc) · 1001 Bytes
/
publish.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
on:
push:
branches: [main]
jobs:
deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.garnix.io?priority=41 https://cache.nixos.org/
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build .
- run: nix develop .#deploy
- run: |
netlify deploy \
--dir=$(readlink --canonicalize result) \
--prod \
--site ${{ secrets.NETLIFY_SITE_ID }} \
--auth ${{ secrets.NETLIFY_AUTH_TOKEN }}
- name: Upload artifact
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: blog
path: ./result