Skip to content

Commit 5f86dbe

Browse files
author
Chris
committed
Cleanup
1 parent cf79e5f commit 5f86dbe

File tree

2 files changed

+134
-91
lines changed

2 files changed

+134
-91
lines changed

.github/workflows/deploy-gh-pages.yml

+34-16
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
1-
name: Deploy to GitHub Pages
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy static content to Pages
23

34
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
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+
624
jobs:
725
build:
826
runs-on: ubuntu-latest
@@ -21,17 +39,6 @@ jobs:
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-
uses: actions/[email protected]
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

Comments
 (0)