Skip to content

ci: add wasm build and deploy #1

ci: add wasm build and deploy

ci: add wasm build and deploy #1

Workflow file for this run

name: Build
on:
push:
branches:
- main
- ci
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0-dev.274+c0da92f71
# - name: Setup emsdk
# uses: mymindstorm/setup-emsdk@v14
# with:
# version: 1.38.40
# actions-cache-folder: 'emsdk-cache'
- name: Build and cache
run: zig build -Dtarget=wasm32-emscripten
- name: Move artifact
run: mv zig-out/web/wgui.html zig/out/index.html
- name: Publish on pages branch
run: |
sudo chown -R $(whoami):$(whoami) .
git config --global user.email "[email protected]"
git config --global user.name "$GITHUB_ACTOR"
git remote set-url origin "https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY"
ghp-import -f -p -n zig-out/web/