update wasm path #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build the static website | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build the static website | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v30 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
- name: Install GHC-wasm and build | |
working-directory: . | |
run: nix develop --command bash -c "wasm32-wasi-cabal update && wasm32-wasi-cabal build" | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "22.11" | |
- name: Compile frontend | |
working-directory: ./frontend | |
run: | | |
npm install | |
npm run docs:build | |
- name: Prepare website | |
run: | | |
cp -r frontend/.vitepress/dist site | |
cp ./dist-newstyle/build/wasm32-wasi/ghc-*/type-inference-zoo-0.1.0.0/x/type-inference-zoo-exe/build/type-inference-zoo-exe/type-inference-zoo-exe.wasm site/bin.wasm | |
- name: Upload Artifact for GitHub Pages | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./site | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v1 | |
with: | |
branch: gh-pages |