patch fix #77
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: deploy-github-page | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: write | |
jobs: | |
build-web: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Install rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
targets: wasm32-unknown-unknown | |
# note that the cache will get cleared if using tagged releases and tagged release version increments | |
# this isn't an issue currently as releases always come from master, but could be an issue in the future | |
- name: Populate target directory from cache | |
uses: Leafwing-Studios/[email protected] | |
- name: Install cargo-binstall | |
uses: cargo-bins/[email protected] | |
# install binaries where possible because it's much faster than rebuilding from source | |
# trunk build --release will install wasm-bindgen and wasm-opt; | |
- name: Install release dependencies | |
run: | | |
cargo binstall --no-confirm [email protected] [email protected] [email protected] | |
- name: Build Release | |
# TODO: it's not clear to me why I need to express target here, but it's inferred properly locally | |
run: | | |
trunk build --release --target wasm32-unknown-unknown | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: dist |