Skip to content

Commit e3c19a1

Browse files
committed
ops(deploy): 更新 GitHub Pages 部署配置
1 parent dc73c7d commit e3c19a1

1 file changed

Lines changed: 10 additions & 14 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ on:
55
branches: [main]
66

77
permissions:
8-
contents: write
9-
pages: read
8+
contents: read
9+
pages: write
10+
id-token: write
1011

1112
jobs:
1213
build:
@@ -28,22 +29,17 @@ jobs:
2829
run: GITHUB_PAGES=true npm run build
2930

3031
- name: Upload artifact
31-
uses: actions/upload-artifact@v4
32+
uses: actions/upload-pages-artifact@v3
3233
with:
33-
name: dist
3434
path: dist
3535

3636
deploy:
3737
needs: build
3838
runs-on: ubuntu-latest
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
3942
steps:
40-
- name: Download artifact
41-
uses: actions/download-artifact@v4
42-
with:
43-
name: dist
44-
45-
- name: Deploy
46-
uses: peaceiris/actions-gh-pages@v4
47-
with:
48-
github_token: ${{ secrets.GITHUB_TOKEN }}
49-
publish_dir: ./
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)