Skip to content

Commit f09832b

Browse files
committed
Fixes
1 parent 361b9c8 commit f09832b

File tree

1 file changed

+31
-14
lines changed

1 file changed

+31
-14
lines changed

.github/workflows/deploy.yml

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,50 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches: [main]
6-
pull_request:
7-
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: false
815

916
jobs:
10-
build-and-deploy:
17+
build:
1118
runs-on: ubuntu-latest
12-
1319
steps:
1420
- name: Checkout
15-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
1622

1723
- name: Setup Node.js
18-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
1925
with:
2026
node-version: "18"
2127
cache: "npm"
2228

23-
- name: Clean install
24-
run: |
25-
rm -rf node_modules package-lock.json
26-
npm install
29+
- name: Install dependencies
30+
run: npm ci
2731

2832
- name: Build
2933
run: npm run build
3034

31-
- name: Deploy to GitHub Pages
32-
uses: peaceiris/actions-gh-pages@v3
35+
- name: Setup Pages
36+
uses: actions/configure-pages@v3
37+
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v2
3340
with:
34-
github_token: ${{ secrets.GITHUB_TOKEN }}
35-
publish_dir: ./dist
41+
path: "./dist"
42+
43+
deploy:
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
runs-on: ubuntu-latest
48+
needs: build
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)