File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy to GitHub Pages
2
+
3
+ on :
4
+ push :
5
+ branches : ["main"]
6
+ workflow_dispatch :
7
+
8
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9
+ permissions :
10
+ contents : read
11
+ pages : write
12
+ id-token : write
13
+
14
+ # Allow only one concurrent deployment
15
+ concurrency :
16
+ group : " pages"
17
+ cancel-in-progress : true
18
+
19
+ jobs :
20
+ build :
21
+ runs-on : ubuntu-latest
22
+ steps :
23
+ - name : Checkout repository
24
+ uses : actions/checkout@v4
25
+
26
+ - name : Install wasm-pack
27
+ run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
28
+
29
+ - name : Build Rust WASM package
30
+ working-directory : ./kmonadx-wasm
31
+ run : wasm-pack build --target web
32
+
33
+ - name : Setup Node.js
34
+ uses : actions/setup-node@v4
35
+ with :
36
+ node-version : ' 20'
37
+ cache : ' npm'
38
+
39
+ - name : Install dependencies
40
+ run : npm ci
41
+
42
+ - name : Build website
43
+ run : npm run build
44
+
45
+ - name : Upload artifact
46
+ uses : actions/upload-pages-artifact@v3
47
+ with :
48
+ path : ./dist
49
+
50
+ deploy :
51
+ needs : build
52
+ environment :
53
+ name : github-pages
54
+ url : ${{ steps.deployment.outputs.page_url }}
55
+ runs-on : ubuntu-latest
56
+ steps :
57
+ - name : Deploy to GitHub Pages
58
+ id : deployment
59
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments