Skip to content

Commit b2b15b4

Browse files
committed
Deploying to pages
1 parent 4f562d4 commit b2b15b4

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/haskell.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88

99
permissions:
1010
contents: read
11+
pages: write
12+
id-token: write
1113

1214
jobs:
1315
build:
@@ -36,4 +38,28 @@ jobs:
3638
3739
- name: Building wasm
3840
run: |
39-
wasm32-wasi-cabal build sql2er-wasm -f build-sql2er-wasm
41+
wasm32-wasi-cabal build sql2er-wasm -f build-sql2er-wasm
42+
43+
deploy:
44+
environment:
45+
name: github-pages
46+
url: ${{steps.deployment.outputs.page_url}}
47+
48+
runs-on: ubuntu-22.04
49+
needs: build
50+
steps:
51+
- name: Copy binary and index.html
52+
- run: |
53+
mkdir -p artifact_dir
54+
cp $(cabal list-bin sql2er-wasm -f build-sql2er-wasm) artifact_dir/
55+
cp index.html artifact_dir/
56+
57+
- name: Upload static files as artifact
58+
id: deployment
59+
uses: actions/upload-pages-artifact@v3
60+
with:
61+
path: artifact_dir/
62+
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)