chore(ci): deploy workflow support custom backend url#1810
Conversation
…ce to custom URL - Replace alpha/production dropdown with a string input for backend URL - Default to https://agent.bytedev.site/ - Allows any custom backend URL to be specified at dispatch time Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe GitHub Pages deploy workflow now accepts a required ChangesBackend URL Input Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
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-gh-pages.yml:
- Around line 39-46: The workflow currently expands `${{
github.event.inputs.backend_url }}` directly inside the run script, allowing
template injection; change it to pass the input via the job step env mapping
(e.g. set ENV_BACKEND_URL: ${{ github.event.inputs.backend_url ||
'https://agent.bytedev.site/' }}) and then reference that shell variable inside
the run block (use "$ENV_BACKEND_URL" to set VITE_ORIGIN_URL and write to
designer-demo/env/.env.alpha), ensuring no inline GitHub expression is placed
inside the heredoc or the shell assignment.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 25066301-9fc0-4184-961e-e4d4d15473f1
📒 Files selected for processing (1)
.github/workflows/deploy-gh-pages.yml
- Validate backend_url input: reject multiline values, enforce http(s) URL format without query/hash, normalize trailing slash
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
What is the current behavior?
${{ github.event.inputs }}直接内联在run脚本中,存在模板注入风险。Issue Number: N/A
What is the new behavior?
environment(choice: alpha/production)替换为backend_url(string 类型),默认值为https://agent.bytedev.site/,支持输入任意自定义后端地址env映射中赋值,run内只引用普通 shell 变量,消除模板注入风险Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit