Skip to content

Commit 85b0380

Browse files
committed
fix
1 parent 5a13e26 commit 85b0380

File tree

1 file changed

+28
-19
lines changed

1 file changed

+28
-19
lines changed

.github/workflows/webpack.yml

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
# .github/workflows/deploy.yml
12
name: Build & Deploy to GitHub Pages
23

4+
# Only run on real source changes to main (ignore dist/ uploads)
35
on:
46
push:
57
branches: [ main ]
@@ -9,37 +11,44 @@ on:
911
pull_request:
1012
branches: [ main ]
1113

14+
# Grant the Pages actions the rights they need
15+
permissions:
16+
contents: read # for checkout
17+
pages: write # to publish the site
18+
id-token: write # if you use OIDC (not strictly needed here)
19+
1220
jobs:
1321
build:
1422
runs-on: ubuntu-latest
1523
strategy:
1624
matrix:
17-
node-version: [18.x,20.x,22.x]
25+
node-version: [18.x, 20.x, 22.x]
1826

1927
steps:
20-
- uses: actions/checkout@v4
28+
- name: Checkout source
29+
uses: actions/checkout@v4
2130

22-
- name: Setup Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v4
24-
with:
25-
node-version: ${{ matrix.node-version }}
31+
- name: Set up Node.js ${{ matrix.node-version }}
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: ${{ matrix.node-version }}
2635

27-
- name: Install & build
28-
run: |
29-
npm ci
30-
npm run build
36+
- name: Install & Build
37+
run: |
38+
npm ci
39+
npm run build
3140
32-
- name: Configure Pages
33-
uses: actions/configure-pages@v3
41+
- name: Configure Pages
42+
uses: actions/configure-pages@v3
3443

35-
- name: Upload artifact
36-
uses: actions/upload-pages-artifact@v1
37-
with:
38-
path: ./dist
44+
- name: Upload built site
45+
uses: actions/upload-pages-artifact@v1
46+
with:
47+
path: dist
3948

4049
deploy:
41-
needs: build
4250
runs-on: ubuntu-latest
51+
needs: build
4352
steps:
44-
- name: Deploy to GitHub Pages
45-
uses: actions/deploy-pages@v1
53+
- name: Deploy to GitHub Pages
54+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)