test browser version #19
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: ci | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pages: write | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup target add wasm32-unknown-unknown | |
- uses: Swatinem/rust-cache@v2 | |
- name: Format | |
run: cargo fmt --check | |
- name: Check | |
run: cargo check | |
- name: Clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::unwrap_used -D clippy::expect_used | |
- name: Build wasm | |
run: cargo build --release --target wasm32-unknown-unknown | |
- name: Prepare deploy dir | |
run: | | |
mkdir -p ./deploy | |
cp ./target/wasm32-unknown-unknown/release/tuco.wasm ./deploy/ | |
cp index.html ./deploy/ | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./deploy |