Skip to content

Commit 48ea81d

Browse files
authored
Update GitHub Actions workflow for static deployment
1 parent c1f0206 commit 48ea81d

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

.github/workflows/static.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
# Simple workflow for deploying static content to GitHub Pages
2-
name: Deploy static content to Pages
2+
name: Deploy browser build to GitHub Pages
33

44
on:
5-
# Runs on pushes targeting the default branch
65
push:
76
branches: ["main"]
8-
9-
# Allows you to run this workflow manually from the Actions tab
107
workflow_dispatch:
118

129
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1310
permissions:
14-
contents: read
15-
pages: write
16-
id-token: write
11+
contents: write
1712

1813
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1914
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
@@ -22,22 +17,27 @@ concurrency:
2217
cancel-in-progress: false
2318

2419
jobs:
25-
# Single deploy job since we're just deploying
2620
deploy:
27-
environment:
28-
name: github-pages
29-
url: ${{ steps.deployment.outputs.page_url }}
3021
runs-on: ubuntu-latest
3122
steps:
3223
- name: Checkout
3324
uses: actions/checkout@v4
34-
- name: Setup Pages
35-
uses: actions/configure-pages@v5
36-
- name: Upload artifact
37-
uses: actions/upload-pages-artifact@v3
25+
26+
- name: Use Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: "20"
30+
31+
- name: Install dependencies
32+
working-directory: Build
33+
run: npm i
34+
35+
- name: Build
36+
working-directory: Build
37+
run: npm run build
38+
39+
- name: Deploy browser build to GitHub Pages
40+
uses: peaceiris/actions-gh-pages@v4
3841
with:
39-
# Upload entire repository
40-
path: '.'
41-
- name: Deploy to GitHub Pages
42-
id: deployment
43-
uses: actions/deploy-pages@v4
42+
github_token: ${{ secrets.GITHUB_TOKEN }}
43+
publish_dir: Build/dist

0 commit comments

Comments
 (0)