Skip to content
name: Build Rust WASM page and Deploy to GitHub Pages
on:
push:
paths:
- 'rust-wasm/**'
pull_request:
paths:
- 'rust-wasm/**'
concurrency:
group: wasm-page-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust 1.74.0
uses: actions-rust-lang/setup-rust-toolchain@v1

Check failure on line 23 in .github/workflows/rust-wasm-webpage.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/rust-wasm-webpage.yml

Invalid workflow file

You have an error in your yaml syntax on line 23
with:
toolchain: '1.74.0'
target: 'wasm32-unknown-unknown'
- name: Build WebAssembly
# run in rust-wasm directory
working-directory: ./rust-wasm
run: |
cargo install wasm-pack
wasm-pack build --target web
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./rust-wasm
exclude_assets: '.github,src/'