ci: deploy documentation with reusable workflow - #724
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Walkthrough新增文档页面部署工作流,支持发布完成或手动触发,并配置 Pages 写入及 OIDC 权限,通过外部工作流模板执行部署。 Changes文档页面部署
Estimated code review effort: 1 (Trivial) | ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
React Doctor could not complete this scan.
Reviewed by React Doctor for commit |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/deploy-pages.yml:
- Line 15: 将 deploy-pages.yml 中对外部可复用工作流的 `@main` 引用替换为经过审查的完整 commit
SHA,并保留现有工作流路径与权限配置不变。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5c5c7b7f-67ff-4614-8d62-c5f4014bb8ff
📒 Files selected for processing (1)
.github/workflows/deploy-pages.yml
|
|
||
| jobs: | ||
| deploy: | ||
| uses: react-component/rc-test/.github/workflows/deploy-pages.yml@main |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== workflow file =="
if [ -f .github/workflows/deploy-pages.yml ]; then
cat -n .github/workflows/deploy-pages.yml
else
echo "missing .github/workflows/deploy-pages.yml"
fi
echo
echo "== changed files/status =="
git status --short
echo
git diff --stat || true
echo
echo "== all reusable workflow references under deploy-pages.yml context =="
rg -n "uses:\s*[^#]*(deploy-pages|\.github/workflows)" .github/workflows/deploy-pages.yml || true
echo
echo "== all git references to rc-test deploy-pages workfows =="
rg -n "react-component/rc-test/.github/workflows/deploy-pages\.yml|rc-test/.github/workflows/deploy-pages" .github . 2>/dev/null | head -100 || trueRepository: react-component/upload
Length of output: 875
将外部可复用工作流固定到完整 commit SHA。
当前 react-component/rc-test/.github/workflows/deploy-pages.yml@main 会随上游分支变更自动拉取新代码,该工作流拥有 pages: write 和 id-token: write 权限;改用完整 SHA 可避免发布重跑使用未经审查的工作流版本。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/deploy-pages.yml at line 15, 将 deploy-pages.yml
中对外部可复用工作流的 `@main` 引用替换为经过审查的完整 commit SHA,并保留现有工作流路径与权限配置不变。
❌ Deploy failed
📋 Build log (last lines)🤖 Powered by surge-preview |
|||||||||
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #724 +/- ##
=======================================
Coverage 89.58% 89.58%
=======================================
Files 6 6
Lines 317 317
Branches 94 90 -4
=======================================
Hits 284 284
Misses 33 33 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|

Summary
Verification
Summary by CodeRabbit
新功能
配置