Skip to content

update deploy CI

update deploy CI #3

Workflow file for this run

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@v3
with:
path: site/
deploy:
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4