Repository navigation
ONE-167 nav v1 返工:后端部署工作流修复(ONE-195:Deploy 前 codegen + ACCOUNT_ID 改 vars) - #3
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
ONE-168 合并 main 后,Deploy workflow 连续失败(attempt 3 卡在
Could not resolve "../db/schema.generated")。本 PR 按 ONE-195 范围修复两条根因,不改任何业务代码、不改冻结契约。修复内容(仅两条)
worker/package.json的deploy脚本由wrangler deploy改为pnpm codegen && wrangler deploy(与dev/build/typecheck/test既有模式一致);deploy.yml的「Deploy Worker」步骤改为调用该脚本pnpm run deploy --secrets-file "$RUNNER_TEMP/secrets.json"(codegen 先跑,参数原样传给 wrangler)。用pnpm run deploy而非pnpm deploy简写,因为后者会命中 pnpm 内置的 deploy 命令。deploy.yml的CLOUDFLARE_ACCOUNT_ID从secrets.CLOUDFLARE_ACCOUNT_ID改为vars.CLOUDFLARE_ACCOUNT_ID(该值配置为仓库 Variable,非 secret;CLOUDFLARE_API_TOKEN仍从 secrets 读取)。自测证据
schema.generated.ts)直接wrangler deploy --dry-run→Could not resolve "../db/schema.generated",与 CI attempt 3 失败一致。pnpm run deploy --dry-run --secrets-file …→ codegen 运行、wrangler 打包成功(Total Upload 970 KiB,bindings 含 secrets 文件里的 SESSION_SECRET / SETUP_SECRET,显示 hidden)、dry-run 正常退出,不再出现 resolve 错误。说明