-
Notifications
You must be signed in to change notification settings - Fork 14
37 lines (33 loc) · 975 Bytes
/
build-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
name: Build and deploy to GitHub Pages
on:
push:
branches:
- main
jobs:
build-deploy:
name: Build and deploy
runs-on: ubuntu-latest
env:
GHC_VERSION: '8.10'
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
with:
ghc-version: ${{env.GHC_VERSION}}
- name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v3
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-${{ env.GHC_VERSION }}-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }}
restore-keys: ${{ runner.os }}-${{ env.GHC_VERSION }}-
- run: cabal build --only-dependencies
- run: cabal build
- run: cabal exec site build
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: gh-pages
folder: _site