Skip to content

Commit f58622f

Browse files
committed
add worlkflow for gh pages
1 parent afa96c6 commit f58622f

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build and Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout sources
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
21+
- name: Set up Rust
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
toolchain: stable
25+
target: wasm32-unknown-unknown
26+
override: true
27+
28+
- name: Install wasm-pack
29+
run: cargo install wasm-pack
30+
31+
- name: Install npm dependencies
32+
run: npm ci
33+
34+
- name: Build project
35+
run: npm run build
36+
37+
- name: Deploy to GitHub Pages
38+
uses: peaceiris/actions-gh-pages@v4
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
publish_dir: ./dist

0 commit comments

Comments
 (0)