-
-
Notifications
You must be signed in to change notification settings - Fork 139
55 lines (52 loc) · 1.53 KB
/
main.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
48
49
50
51
52
53
54
55
name: test matrix
on:
push:
branches:
- master
pull_request:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
jobs:
build:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: cachix/cachix-action@v12
with:
name: miso-haskell
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Dependency install
run: nix-build -A pkgs.yarn default.nix && nix-env -i ./result
- name: Miso build
run: nix-build -j1
- name: Diffing tests
run: cd tests && yarn && yarn test
deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: miso-haskell
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Miso build
run: nix-build -j1
- name: Deploy
run: nix-build -A deploy -j1 && ./result
env:
AWS_SECRET_ACCESS_KEY: '${{ secrets.AWS_SECRET_ACCESS_KEY }}'
AWS_ACCESS_KEY_ID: '${{ secrets.AWS_ACCESS_KEY_ID }}'
DEPLOY: '${{ secrets.DEPLOY }}'
EMAIL: '${{ secrets.EMAIL }}'