chore: main stage/release prod 배포 흐름을 web/admin 공통으로 정비#437
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. Walkthrough이 변경사항은 배포 파이프라인을 재구성하는 세 가지 업데이트를 담고 있습니다.
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 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: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/release.yml (1)
23-23:⚠️ Potential issue | 🟡 Minor
actions/checkout@v3을@v4로 업데이트해 주세요.
release.yml에서actions/checkout@v3이 Line 23, 45, 133에서 사용되고 있어요.v3은 Node.js 16 기반으로, GitHub Actions에서 deprecated 상태예요.deploy-stage.yml에서는 이미@v4를 사용 중이므로 통일해 주시면 좋겠어요.🔧 수정 제안
- - uses: actions/checkout@v3 + - uses: actions/checkout@v4세 곳 모두 (Line 23, 45, 133) 동일하게 적용해 주세요.
Also applies to: 45-45, 133-133
🤖 Fix all issues with AI agents
In @.github/workflows/deploy-stage.yml:
- Around line 22-33: The workflow's path filters omit the monorepo shared
packages, so changes under packages/ (api-schema, bruno-api-typescript, config)
won't trigger deployments; update the filters block in
.github/workflows/deploy-stage.yml to add a new key (e.g., shared:) that
includes 'packages/**' (or the specific package paths), and then update the
conditional expressions for the deploy-web-stage and deploy-admin-stage jobs to
also check the shared filter output (i.e., include the shared path-match boolean
alongside the existing web/admin checks) so that changes in shared packages
trigger the corresponding deploy jobs.
In @.github/workflows/release.yml:
- Around line 35-43: The deploy_production job currently lists only
create_release in its needs but references needs.generate_tag.outputs.version
for VERSION_TAG; update the deploy_production job to include generate_tag in its
needs array so the output is accessible. Do the same for the
deploy_admin_production job (which also references
needs.generate_tag.outputs.version) so both jobs can read the generate_tag
output. Ensure the needs entries include the literal job name generate_tag
rather than only create_release.
🧹 Nitpick comments (2)
turbo.json (1)
7-7:.vercel/output/**추가는 괜찮아 보입니다만, 한 가지 참고 사항이 있어요.
@solid-connect/web#build오버라이드(Line 10-14)는outputs에[".next/**", "!.next/cache/**"]만 지정하고 있어요.
- Turbo는 task-specific override가 generic
buildtask보다 우선하므로, web 앱 빌드에서는.vercel/output/**이 캐시 대상에 포함되지 않아요.- 현재 워크플로우 구조상
vercel build는 turbo 파이프라인 밖에서 별도 step으로 실행되므로, turbo가.vercel/output/**을 실제로 캐싱하는 경우는 admin 앱의 genericbuildtask뿐일 수 있어요.의도한 설계라면 문제없지만, 확인해 보시면 좋겠습니다. 😊
.github/workflows/release.yml (1)
64-79: Turbo 빌드와 Vercel 빌드가 순차적으로 실행되어 이중 빌드가 발생할 수 있어요.
- Line 65:
pnpm turbo run build로 Next.js 빌드를 먼저 실행해요.- Line 78:
vercel build가 다시 프레임워크 빌드를 실행해요.- Next.js의
.next/cache가 디스크에 남아있어 두 번째 빌드가 빨라질 수 있지만, 본질적으로 같은 빌드를 두 번 하는 구조예요.Vercel prebuilt 배포 패턴(
vercel pull → vercel build → vercel deploy --prebuilt)만으로 충분하다면, Line 64-65의 turbo 빌드 step은 제거를 검토해 볼 수 있어요. 반대로 turbo 리모트 캐시 워밍이 목적이라면 현재 구조를 유지하되 의도를 주석으로 남겨두면 좋겠어요.
.github/workflows/release.yml
Outdated
| deploy_production: | ||
| name: Deploy Web (Production) | ||
| runs-on: ubuntu-latest | ||
| needs: create_release | ||
| env: | ||
| VERSION_TAG: ${{ needs.generate_tag.outputs.version }} | ||
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_WEB_PROD }} | ||
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
| TURBO_TEAM: ${{ secrets.TURBO_TEAM }} |
There was a problem hiding this comment.
🚨 needs에 generate_tag가 누락되어 VERSION_TAG 참조가 실패합니다.
deploy_productionjob의needs가create_release만 포함하고 있어요 (Line 38).- 하지만 Line 40에서
needs.generate_tag.outputs.version을 참조하고 있어요. - GitHub Actions에서는
needs배열에 명시적으로 포함된 job의 outputs만 접근할 수 있으므로, 이 표현식은 빈 값이 되거나 워크플로우 오류가 발생해요.
deploy_admin_production job (Line 126-128)에도 동일한 문제가 있어요.
🐛 수정 제안: 두 deploy job 모두 `generate_tag`을 needs에 추가
deploy_production:
name: Deploy Web (Production)
runs-on: ubuntu-latest
- needs: create_release
+ needs: [create_release, generate_tag]
env:
VERSION_TAG: ${{ needs.generate_tag.outputs.version }} deploy_admin_production:
name: Deploy Admin (Production)
runs-on: ubuntu-latest
- needs: create_release
+ needs: [create_release, generate_tag]
env:
VERSION_TAG: ${{ needs.generate_tag.outputs.version }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| deploy_production: | |
| name: Deploy Web (Production) | |
| runs-on: ubuntu-latest | |
| needs: create_release | |
| env: | |
| VERSION_TAG: ${{ needs.generate_tag.outputs.version }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_WEB_PROD }} | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
| deploy_production: | |
| name: Deploy Web (Production) | |
| runs-on: ubuntu-latest | |
| needs: [create_release, generate_tag] | |
| env: | |
| VERSION_TAG: ${{ needs.generate_tag.outputs.version }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_WEB_PROD }} | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ secrets.TURBO_TEAM }} |
🧰 Tools
🪛 actionlint (1.7.10)
[error] 40-40: property "generate_tag" is not defined in object type {create_release: {outputs: {}; result: string}}
(expression)
🤖 Prompt for AI Agents
In @.github/workflows/release.yml around lines 35 - 43, The deploy_production
job currently lists only create_release in its needs but references
needs.generate_tag.outputs.version for VERSION_TAG; update the deploy_production
job to include generate_tag in its needs array so the output is accessible. Do
the same for the deploy_admin_production job (which also references
needs.generate_tag.outputs.version) so both jobs can read the generate_tag
output. Ensure the needs entries include the literal job name generate_tag
rather than only create_release.
Summary
main푸시 시 stage 배포를 자동 수행하는deploy-stage.yml을 추가해 web/admin을 각각 Vercel CLI prebuilt 방식으로 배포하도록 통일했습니다.release.yml을 production 전용으로 재정비해 web/admin을 별도 job으로 배포하고,vercel pull -> build -> deploy --prebuilt흐름 및 앱별 프로젝트 ID secret을 분리했습니다..vercel-ci/*.log로 수집하고 GitHub artifact 업로드 + step summary 출력을 추가했으며, turbo 캐시 복원을 위해.vercel/output/**를 turbo build outputs에 포함했습니다.Required Secrets
VERCEL_ORG_IDVERCEL_TOKENVERCEL_PROJECT_ID_WEB_STAGEVERCEL_PROJECT_ID_ADMIN_STAGEVERCEL_PROJECT_ID_WEB_PRODVERCEL_PROJECT_ID_ADMIN_PRODTURBO_TOKENTURBO_TEAM