Skip to content

Commit

Permalink
Deploying to pages
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharad committed Nov 13, 2024
1 parent 4f562d4 commit b2b15b4
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/haskell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
Expand Down Expand Up @@ -36,4 +38,28 @@ jobs:
- name: Building wasm
run: |
wasm32-wasi-cabal build sql2er-wasm -f build-sql2er-wasm
wasm32-wasi-cabal build sql2er-wasm -f build-sql2er-wasm
deploy:
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}

runs-on: ubuntu-22.04
needs: build
steps:
- name: Copy binary and index.html
- run: |
mkdir -p artifact_dir
cp $(cabal list-bin sql2er-wasm -f build-sql2er-wasm) artifact_dir/
cp index.html artifact_dir/
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: artifact_dir/

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit b2b15b4

Please sign in to comment.