1
- name : Deploy to GitHub Pages
1
+ # Simple workflow for deploying static content to GitHub Pages
2
+ name : Deploy static content to Pages
2
3
3
4
on :
5
+ # Runs on pushes targeting the default branch
6
+ push :
7
+ branches : [$default-branch]
8
+
9
+ # Allows you to run this workflow manually from the Actions tab
4
10
workflow_dispatch :
5
11
12
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13
+ permissions :
14
+ contents : read
15
+ pages : write
16
+ id-token : write
17
+
18
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20
+ concurrency :
21
+ group : " pages"
22
+ cancel-in-progress : false
23
+
6
24
jobs :
7
25
build :
8
26
runs-on : ubuntu-latest
21
39
- name : Build the project
22
40
run : cargo build --release --target wasm32-unknown-unknown
23
41
24
- - name : Upload artifacts
25
- uses : actions/upload-artifact@v4
26
-
27
- deploy :
28
- runs-on : ubuntu-latest
29
- needs : build
30
-
31
- steps :
32
- - name : Download a Build Artifact
33
-
34
-
35
42
- name : Install wasm-bindgen-cli
36
43
run : cargo install wasm-bindgen-cli
37
44
@@ -40,10 +47,21 @@ jobs:
40
47
41
48
- name : Copy index.html to deploy directory
42
49
run : cp index.html ./out
43
-
50
+
51
+ - name : Upload artifacts
52
+ uses : actions/upload-artifact@v4
53
+ with :
54
+ name : github-pages
55
+ path : ' .out'
56
+
57
+ deploy :
58
+ environment :
59
+ name : github-pages
60
+ url : ${{ steps.deployment.outputs.page_url }}
61
+ runs-on : ubuntu-latest
62
+ steps :
44
63
- name : Setup Pages
45
- uses : actions/configure-pages@v4
46
-
64
+ uses : actions/configure-pages@v5
47
65
- name : Deploy to GitHub Pages
48
66
id : deployment
49
- uses : actions/deploy-pages@v4
67
+ uses : actions/deploy-pages@v4
0 commit comments