Skip to content

Commit

Permalink
CI/CD: deploying to github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharad committed Nov 13, 2024
1 parent 4f562d4 commit 743c288
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 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,27 @@ 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
- name: Copy binary and index.html
run: |
mkdir -p artifact_dir
cp dist-newstyle/build/wasm32-wasi/ghc-9.8.3.20241108/sql2er-0.1.0.1/x/sql2er-wasm/opt/build/sql2er-wasm/sql2er-wasm.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/

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 743c288

Please sign in to comment.