46 lines (44 loc) · 1.15 KB
/
deploy.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
name: Deploy
on:
push:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
environment: deploy
steps:
- uses: actions/checkout@v2
- uses: actions/setup-haskell@v1
with:
ghc-version: '8.10.3'
cabal-version: '3.2'
- name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v2
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}
- name: Install dependencies
run: |
cabal new-update
cabal new-install --only-dependencies
- name: Build
run: |
cabal new-configure --enable-tests
cabal new-build
- name: Run tests
run: cabal new-test
- name: Site build
run: cabal new-run mikey-bike -- build
- name: rsync deployments
uses: burnett01/rsync-deployments@4.1
with:
switches: -avzr
path: _site/
remote_path: /srv/www/mikey.bike/public_html/
remote_host: mikey.bike
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}