fix(ci): 生产环境部署也通过 CI 渲染 + 上传 .env(与 staging 对齐,避免 DOUBAO 等密钥丢失)
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m15s
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 10m20s
AI Code Review / AI Code Review (pull_request) Failing after 10m23s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 10m5s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 11s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 19s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m15s
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 10m20s
AI Code Review / AI Code Review (pull_request) Failing after 10m23s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 10m5s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 11s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 19s
- deploy-production 新增 Render .env from template 步骤(复用 render_env.sh production) - Deploy production over SSH 在拉镜像前加 SCP 上传渲染后的 .env + config diff 检查 - ci_production_deploy.sh: .env 不存在时给出清晰错误提示(对齐 staging) 本次主因修复:#1958 只补了 staging 的 DOUBAO 注入路径,但生产环境 deploy-production 直接读取服务器上手写的 .env,下次 release 到 main 时 AI 端点同样会因缺 DOUBAO_API_KEY 返回 502。本次同步补齐,确保生产也走 CI 统一渲染管线。
This commit is contained in:
+465
-467
File diff suppressed because it is too large
Load Diff
@@ -69,7 +69,11 @@ if [ -z "$IMAGE_TAG" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test -f "$ENV_FILE"
|
||||
if [ ! -f "$ENV_FILE" ]; then
|
||||
echo "ERROR: $ENV_FILE 不存在。CI 应先在 render_env 步骤渲染并上传此文件"
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ .env file found: $ENV_FILE ($(wc -l < $ENV_FILE) lines)"
|
||||
mkdir -p "$GENERATED_DIR"
|
||||
mkdir -p "$LEGACY_ASSETS_DIR"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user