Skip to content

Commit 0f11c3f

Browse files
author
kaiyu.kong
committed
feat: yml
1 parent 49d5890 commit 0f11c3f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ on:
1717
jobs:
1818
build-and-deploy:
1919
runs-on: ubuntu-latest
20+
# 添加全局权限配置[1,7](@ref)
21+
permissions:
22+
contents: write # 关键:授予仓库写入权限
23+
pages: write
24+
id-token: write
2025
steps:
2126
- name: Checkout
2227
uses: actions/[email protected] # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
@@ -29,8 +34,8 @@ jobs:
2934
- name: Build docs
3035
run: npm run build
3136
- name: Deploy docs
32-
uses: JamesIves/github-pages-deploy-action@4.1.7
37+
uses: JamesIves/github-pages-deploy-action@v4.5.0 # 升级至最新版[2,7](@ref)
3338
with:
3439
branch: gh-pages
3540
folder: site
36-
target-folder: ${{github.ref}}
41+
target-folder: ${{github.ref_name}}

0 commit comments

Comments
 (0)