-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 1.44 KB
/
web.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
name: Web
# Trigger the workflow on push or pull request, but only for the main branch
on:
pull_request:
paths:
- "app/**"
- "asmh.cabal"
- "cabal.project"
- "Setup.hs"
- "src/**"
- "test/**"
- "web/**"
push:
paths:
- "app/**"
- "asmh.cabal"
- "cabal.project"
- "Setup.hs"
- "src/**"
- "test/**"
- "web/**"
workflow_dispatch:
jobs:
build:
name: "Build website"
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: nixbuild/nix-quick-install-action@v29
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: wasm-cabal-cache
uses: actions/cache@v4
with:
key: wasm-cabal-cache-${{ hashFiles('dist-newstyle/cache/plan.json')}}
restore-keys: wasm-cabal-cache-
path: |
~/.ghc-wasm/.cabal/store
dist-newstyle
- name: Build site
run: |
nix develop --command bash -c "cd web && ./build.sh prod && ls dist/"
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './web/dist/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4