File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 99 - ' .github/workflows/deploy-docs.yml'
1010 workflow_dispatch :
1111
12- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1312permissions :
1413 contents : read
1514 pages : write
1615 id-token : write
1716
18- # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19- # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2017concurrency :
2118 group : " pages"
2219 cancel-in-progress : false
@@ -42,10 +39,15 @@ jobs:
4239
4340 - name : Build VitePress Site
4441 working-directory : ./package/official-site
45- run : |
46- echo "::group::开始构建文档站点"
47- npm run docs:build
48- echo "::endgroup::"
42+ run : npm run docs:build
43+
44+ # ✅ 关键新增:上传构建产物为 github-pages 制品(官方强制要求)
45+ - name : Upload Pages Artifact
46+ uses : actions/upload-pages-artifact@v3
47+ with :
48+ # 指定要上传的产物目录(和你之前的publish_dir一致)
49+ path : ./package/official-site/.vitepress/dist
50+
4951 deploy :
5052 environment :
5153 name : github-pages
5658 - name : Deploy to GitHub Pages
5759 id : deployment
5860 uses : actions/deploy-pages@v4
59- with :
60- # github_token: ${{ secrets.GITHUB_TOKEN }}
61- publish_dir : ./package/official-site/.vitepress/dist
62- force_orphan : true
61+ # ✅ 关键删除:移除所有非法参数(publish_dir/force_orphan/github_token)
62+ # 新版官方Action无需这些参数,自动关联上传的制品+内置令牌
You can’t perform that action at this time.
0 commit comments