Skip to content

fix(ci)

fix(ci) #47

Workflow file for this run

name: wasm
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: wasm
strategy:
matrix:
build: [linux]
include:
- build: linux
os: ubuntu-lastest
rust: nightly
target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-test
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- name: Build and Test
shell: bash
run: |
export RUSTFLAGS="-Awarnings"
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
rustup target add wasm32-unknown-unknown
export PATH="$PATH:/home/runner/.cargo/bin/"
cargo install wasm-pack
bash build_web.zsh
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./www