rm dual checkout #16
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: Build Rust & Deploy Leptos Page | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Exit if not on master branch | |
if: endsWith(github.ref, 'master') == false | |
run: exit -1 | |
# Use binstall | |
- name: Install binstall | |
uses: taiki-e/install-action@cargo-binstall | |
- name: Install cargo component | |
run: echo yes | cargo binstall cargo-component | |
- name: Cargo component build | |
run: cargo component build && cd crates/seed-keeper-wit && cargo component build --release | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: wasm32-unknown-unknown, wasm32-wasi | |
toolchain: nightly-x86_64-unknown-linux-gnu | |
components: rust-src | |
- name: Run workspace tests | |
run: cargo component build && cargo test --workspace --verbose |