Skip to content

Commit f45e7a0

Browse files
committed
actions
1 parent 23f2b02 commit f45e7a0

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflow/deploy.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build and Deploy Wasm
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
14+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout Repository
25+
uses: actions/checkout@v2
26+
27+
- name: Setup Rust
28+
uses: actions/setup-rust@v1
29+
with:
30+
rust-version: stable
31+
32+
- name: Install wasm-pack
33+
run: cargo install wasm-pack
34+
35+
- name: Build Wasm
36+
run: wasm-pack build --target web --out-dir ./app/pkg
37+
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: app
42+
43+
deploy:
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
needs: build
48+
runs-on: ubuntu-latest
49+
name: Deploy
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)