Skip to content

chore(ci): deploy workflow support custom backend url#1810

Open
hexqi wants to merge 3 commits into
opentiny:developfrom
hexqi:fix/update-ci-backend-url
Open

chore(ci): deploy workflow support custom backend url#1810
hexqi wants to merge 3 commits into
opentiny:developfrom
hexqi:fix/update-ci-backend-url

Conversation

@hexqi
Copy link
Copy Markdown
Collaborator

@hexqi hexqi commented Jun 1, 2026

English | 简体中文

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Built its own designer, fully self-validated

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Background and solution

What is the current behavior?

  • deploy-gh-pages workflow 的后端环境通过 alpha/production 下拉选择,无法指向自定义后端地址。之前默认的 agent-alpha/agent.opentiny.design 地址已失效。
  • 同时 ${{ github.event.inputs }} 直接内联在 run 脚本中,存在模板注入风险。

Issue Number: N/A

What is the new behavior?

  • environment(choice: alpha/production)替换为 backend_url(string 类型),默认值为 https://agent.bytedev.site/,支持输入任意自定义后端地址
  • 将 GitHub 表达式移至 step env 映射中赋值,run 内只引用普通 shell 变量,消除模板注入风险

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Chores
    • Updated deployment workflow to accept a configurable backend URL parameter instead of predefined environment selection.

…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>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: bd37b4cf-b6dd-4531-9039-3ccf067210d5

📥 Commits

Reviewing files that changed from the base of the PR and between 294bafd and 25a2ec4.

📒 Files selected for processing (1)
  • .github/workflows/deploy-gh-pages.yml

Walkthrough

The GitHub Pages deploy workflow now accepts a required backend_url string via workflow_dispatch; the CI step uses that URL to set VITE_ORIGIN_URL and appends VITE_ORIGIN into designer-demo/env/.env.alpha, replacing the previous environment-choice logic.

Changes

Backend URL Input Configuration

Layer / File(s) Summary
Backend URL input and environment variable generation
.github/workflows/deploy-gh-pages.yml
workflow_dispatch input changed from an environment choice (alpha/production) to a required backend_url string input. CI step now reads ENV_BACKEND_URL to compute VITE_ORIGIN_URL and appends VITE_ORIGIN into designer-demo/env/.env.alpha, removing hardcoded alpha/production selection and DEPLOY_ENV export.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 No more alpha or prod choice,
Now the backend URL makes all rejoice!
One input string flows through the night,
Deployment config, flexible and light! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(ci): deploy workflow support custom backend url' accurately describes the main change: replacing the environment choice input with a backend_url string input.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hexqi hexqi changed the title chore(ci): deploy workflow 支持自定义后端地址 chore(ci): deploy workflow support custom backend url Jun 1, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 87ac1e0 and a201555.

📒 Files selected for processing (1)
  • .github/workflows/deploy-gh-pages.yml

Comment thread .github/workflows/deploy-gh-pages.yml Outdated
hexqi added 2 commits June 1, 2026 14:13
- Validate backend_url input: reject multiline values, enforce http(s)
  URL format without query/hash, normalize trailing slash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants