-
Notifications
You must be signed in to change notification settings - Fork 41
68 lines (65 loc) · 1.96 KB
/
gh-pages.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
56
57
58
59
60
61
62
63
64
65
66
67
68
name: GH-Pages
on:
push:
branches:
- master
jobs:
linux:
name: GH-Pages - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-22.04
timeout-minutes:
60
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- compiler: ghc-9.6.4
compilerKind: ghc
compilerVersion: 9.6.4
setup-method: ghcup
allow-failure: false
cabalVersion: 3.10.2.1
fail-fast: false
steps:
- name: Set environment variables
run: |
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
- name: env
run: |
env
- uses: actions/checkout@v3
- name: Setup toolchain
run: |
# ghcup install cabal --set ${{ matrix.cabalVersion }}
ghcup install cabal -u https://github.com/haskell/cabal/releases/download/cabal-head/cabal-head-Linux-x86_64.tar.gz head
ghcup install ghc --set ${{ matrix.compilerVersion }}
- name: restore cache
uses: actions/cache/restore@v3
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
- name: build
run: |
cabal update
cabal build hgeometry
- name: haddock
run: |
./haddock.sh
- name: copy-to-pages
run: |
mkdir --parents pages
cp -r haddocks pages
cp haddock.txt pages/
cp haddock_badge.json pages/
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: docs # The branch the action should deploy to.
folder: pages # The folder the action should deploy.
- name: save cache
uses: actions/cache/save@v3
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store