-
Notifications
You must be signed in to change notification settings - Fork 0
/
.build.yml
39 lines (32 loc) · 900 Bytes
/
.build.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
---
image: nixos/latest
oauth: pages.sr.ht/PAGES:RW
environment:
NIX_CONFIG: "experimental-features = nix-command flakes"
SITE: tetov.se
PUBLISH_REF: refs/heads/main
tasks:
- install: |
cd tetov.se
nix develop --command npm ci
- test: |
cd tetov.se
nix develop --command npm test
- pre-commit-hooks: |
cd tetov.se
nix develop --command pre-commit run --all
- build: |
cd tetov.se
nix develop --command npm run build
tar -C public -cvz . > ../site.tar.gz
- publish: |
if [ "$GIT_REF" = "$PUBLISH_REF" ] ; then
cd tetov.se
nix develop --command hut pages publish -d "$SITE" ../site.tar.gz --site-config srht_site_config.json
else
echo 'Not publishing, because $GIT_REF != $PUBLISH_REF'
fi
triggers:
- action: email
condition: failure
to: Anton Tetov <[email protected]>