Skip to content

Commit 02dc04e

Browse files
committed
修改deploy,:使用最新版本的 checkout 动作
1 parent 65f5e12 commit 02dc04e

File tree

1 file changed

+11
-31
lines changed

1 file changed

+11
-31
lines changed

.github/workflows/deploy.yml

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,26 @@ on:
55
branches: [main]
66
workflow_dispatch:
77

8-
permissions:
9-
contents: read
10-
pages: write
11-
id-token: write
12-
13-
concurrency:
14-
group: "pages"
15-
cancel-in-progress: false
16-
178
jobs:
18-
build:
9+
build-and-deploy:
1910
runs-on: ubuntu-latest
2011
steps:
2112
- name: Checkout
22-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
2314

2415
- name: Setup Node
25-
uses: actions/setup-node@v3
16+
uses: actions/setup-node@v4
2617
with:
2718
node-version: "18"
28-
cache: 'npm'
29-
19+
3020
- name: Install dependencies
3121
run: npm ci
32-
33-
- name: Build with Next.js
22+
23+
- name: Build
3424
run: npm run build
35-
36-
- name: Upload artifact
37-
uses: actions/upload-pages-artifact@v2
25+
26+
- name: Deploy
27+
uses: JamesIves/github-pages-deploy-action@v4
3828
with:
39-
path: ./out
40-
41-
deploy:
42-
environment:
43-
name: github-pages
44-
url: ${{ steps.deployment.outputs.page_url }}
45-
runs-on: ubuntu-latest
46-
needs: build
47-
steps:
48-
- name: Deploy to GitHub Pages
49-
id: deployment
50-
uses: actions/deploy-pages@v2
29+
folder: out
30+
branch: gh-pages

0 commit comments

Comments
 (0)