-
Notifications
You must be signed in to change notification settings - Fork 6
39 lines (31 loc) · 891 Bytes
/
deploy.yml
File metadata and controls
39 lines (31 loc) · 891 Bytes
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
36
37
38
39
name: Deploy WASM to GitHub Pages
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Install wasm-pack
run: |
curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | bash
# cargo install wasm-pack
- name: Build WASM
run: wasm-pack build --target web
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./pkg
keep_files: false
force_orphan: true