ci: deploy documentation with reusable workflow - #1083
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Walkthrough新增 GitHub Pages 文档部署工作流,支持发布完成后或手动触发,并复用远程工作流执行部署。 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1083 +/- ##
=======================================
Coverage 98.66% 98.66%
=======================================
Files 15 15
Lines 751 751
Branches 234 234
=======================================
Hits 741 741
Misses 10 10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
❌ Deploy failed
📋 Build log (last lines)🤖 Powered by surge-preview |
|||||||||
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: Update the reusable workflow reference in the deploy-pages workflow
to pin react-component/rc-test/.github/workflows/deploy-pages.yml to the
reviewed full commit SHA instead of the mutable main branch, while preserving
the existing workflow and permissions.
🪄 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: 4a1ddced-a792-4ce8-8605-49abcc7c17cf
📒 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
sha="<reviewed-full-commit-sha>"
git ls-remote --exit-code https://github.com/react-component/rc-test.git "$sha"Repository: react-component/slider
Length of output: 160
🏁 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 ".github/workflows/deploy-pages.yml not found"
fi
echo
echo "== remote repo references =="
git ls-remote --exit-code --heads https://github.com/react-component/rc-test.git || true
echo
git ls-remote --exit-code --tags https://github.com/react-component/rc-test.git || true
echo
echo "== usages =="
rg -n "uses: react-component/rc-test/.github/workflows/deploy-pages.yml|id-token: write|pages: write" .github/workflows || trueRepository: react-component/slider
Length of output: 5042
将可复用工作流固定到完整提交 SHA。
react-component/rc-test/.github/workflows/deploy-pages.yml@main 使用可变分支,上游后续变更会直接改变文档发布流程;该工作流还包含 pages: write 和 id-token: write 权限,应改为已审查的完整 commit 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, Update the reusable workflow
reference in the deploy-pages workflow to pin
react-component/rc-test/.github/workflows/deploy-pages.yml to the reviewed full
commit SHA instead of the mutable main branch, while preserving the existing
workflow and permissions.

Summary
Verification
Summary by CodeRabbit