1- name : Deploy to GitHub Pages
1+ # Simple workflow for deploying static content to GitHub Pages
2+ name : Deploy static content to Pages
23
34on :
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
410 workflow_dispatch :
511
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+
624jobs :
725 build :
826 runs-on : ubuntu-latest
2139 - name : Build the project
2240 run : cargo build --release --target wasm32-unknown-unknown
2341
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-
3542 - name : Install wasm-bindgen-cli
3643 run : cargo install wasm-bindgen-cli
3744
@@ -40,10 +47,21 @@ jobs:
4047
4148 - name : Copy index.html to deploy directory
4249 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 :
4463 - name : Setup Pages
45- uses : actions/configure-pages@v4
46-
64+ uses : actions/configure-pages@v5
4765 - name : Deploy to GitHub Pages
4866 id : deployment
49- uses : actions/deploy-pages@v4
67+ uses : actions/deploy-pages@v4
0 commit comments