-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.03 KB
/
cicd.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
name: build-and-deploy
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
env:
cache-name: brechtserckx-be
pages-branch: github-pages
pages-folder: _site
jobs:
#########
# Build #
#########
build-and-cache:
name: Build and cache
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
submodules: true
- name: Install Nix
uses: cachix/install-nix-action@v19
- name: Test Nix install
run: nix-build --version
- uses: cachix/cachix-action@v12
with:
name: '${{ env.cache-name }}'
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: 'iohk'
- name: Build site with Nix
run: nix-build site.nix
- name: Deploy site
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: JamesIves/[email protected]
with:
branch: ${{ env.pages-branch }}
folder: result