File tree Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : deploy demo
2
+
3
+ on :
4
+ push :
5
+ branches : ["main"]
6
+ workflow_dispatch :
7
+
8
+ permissions :
9
+ contents : read
10
+ pages : write
11
+ id-token : write
12
+
13
+ concurrency :
14
+ group : " pages"
15
+ cancel-in-progress : true
16
+
17
+ jobs :
18
+ deploy :
19
+ environment :
20
+ name : github-pages
21
+ url : ${{ steps.deployment.outputs.page_url }}
22
+
23
+ runs-on : ubuntu-latest
24
+ steps :
25
+ - name : Checkout
26
+ uses : actions/checkout@v4
27
+
28
+ - name : Set up Node.js
29
+ uses : actions/setup-node@v4
30
+ with :
31
+ node-version : 20
32
+ cache : " npm"
33
+ cache-dependency-path : demo/package-lock.json
34
+
35
+ - name : Install Rust
36
+ uses : actions-rs/toolchain@v1
37
+ with :
38
+ toolchain : stable
39
+ override : true
40
+ components : rustfmt
41
+
42
+ - name : Install wasm-pack
43
+
44
+ with :
45
+ version : " latest"
46
+
47
+ - name : Install dependencies
48
+ run : npm install
49
+ working-directory : demo
50
+
51
+ - name : Build
52
+ run : npm run build
53
+ working-directory : demo
54
+
55
+ - name : Setup Pages
56
+ uses : actions/configure-pages@v4
57
+
58
+ - name : Upload artifact
59
+ uses : actions/upload-pages-artifact@v3
60
+ with :
61
+ # Upload dist folder
62
+ path : " ./dist"
63
+
64
+ - name : Deploy to GitHub Pages
65
+ id : deployment
66
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments