-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 942 Bytes
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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