Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughSummary by CodeRabbit릴리스 노트
WalkthroughBuild 단계에 Vercel 사전검증을 위한 두 단계가 추가되었습니다: Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub Actions Runner
participant VCLI as Vercel CLI (npx vercel)
participant VAPI as Vercel API/Platform
GH->>VCLI: 실행 `npx vercel pull --environment=preview` (VERCEL_TOKEN)
VCLI->>VAPI: 요청 환경/설정 (토큰 인증)
VAPI-->>VCLI: 환경 데이터 반환
VCLI-->>GH: 환경 파일/설정 작성
GH->>VCLI: 실행 `npx vercel build` (VERCEL_TOKEN + VITE_* envs)
VCLI->>VAPI: 빌드 시뮬레이션 요청 (토큰 + env)
VAPI-->>VCLI: 빌드 결과/로그
VCLI-->>GH: 종료 코드/출력 전달
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ 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: 1
🧹 Nitpick comments (1)
.github/workflows/ci-cd.yml (1)
53-65: ♻️ DRY 원칙: 환경 변수 중복 제거를 고려해 보세요.
VITE_*환경 변수가 Build와 Simulate Vercel Build 단계에서 중복됩니다. job 레벨의env로 통합하면 유지보수가 용이해집니다.🔧 리팩터링 예시
jobs: build-and-deploy: runs-on: ubuntu-latest env: VITE_KAKAO_REST_API_KEY: ${{ secrets.VITE_KAKAO_REST_API_KEY }} VITE_KAKAO_REDIRECT_URI: ${{ secrets.VITE_KAKAO_REDIRECT_URI }} VITE_API_BASE_URL: ${{ secrets.VITE_API_BASE_URL }} steps: # ... 기존 steps ... - name: Build run: pnpm build - name: Simulate Vercel Build run: npx vercel build env: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci-cd.yml around lines 53 - 65, The two steps named "Build" and "Simulate Vercel Build" duplicate the same VITE_* environment variables; move VITE_KAKAO_REST_API_KEY, VITE_KAKAO_REDIRECT_URI and VITE_API_BASE_URL into the job-level env block so both steps inherit them, and remove those three VITE_* entries from the individual "Build" and "Simulate Vercel Build" step env blocks; keep only step-specific secrets like VERCEL_TOKEN (and any VERCEL_* IDs) in the "Simulate Vercel Build" step env if needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci-cd.yml:
- Around line 60-65: The Simulate Vercel Build step runs "npx vercel build"
without a linked project, so add project context by either committing the
.vercel/project.json created by running "vercel link" locally (preferred) or by
setting VERCEL_ORG_ID and VERCEL_PROJECT_ID as GitHub Secrets and using them in
the vercel build step; also remove duplicate VITE_* entries in the build step by
defining VITE_KAKAO_REST_API_KEY, VITE_KAKAO_REDIRECT_URI and VITE_API_BASE_URL
at the job-level env so the "Simulate Vercel Build" step simply inherits them.
---
Nitpick comments:
In @.github/workflows/ci-cd.yml:
- Around line 53-65: The two steps named "Build" and "Simulate Vercel Build"
duplicate the same VITE_* environment variables; move VITE_KAKAO_REST_API_KEY,
VITE_KAKAO_REDIRECT_URI and VITE_API_BASE_URL into the job-level env block so
both steps inherit them, and remove those three VITE_* entries from the
individual "Build" and "Simulate Vercel Build" step env blocks; keep only
step-specific secrets like VERCEL_TOKEN (and any VERCEL_* IDs) in the "Simulate
Vercel Build" step env if needed.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/release-drafter.yml (1)
27-27: 중복된 조건 검토 제안현재 워크플로우는
push이벤트에서만 트리거되므로github.event_name == 'push'조건이 항상true입니다. 가독성을 위해 제거를 고려해볼 수 있습니다.다만 향후 다른 트리거가 추가될 가능성을 대비한 방어적 코딩으로 볼 수도 있어, 팀 컨벤션에 따라 유지해도 무방합니다.
♻️ 선택적 개선안
- name: Publish Release - if: github.ref == 'refs/heads/main' && github.event_name == 'push' + if: github.ref == 'refs/heads/main' uses: release-drafter/release-drafter@v6📚 참고: GitHub Actions 워크플로우 조건문 문서
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/release-drafter.yml at line 27, The if-condition in the workflow currently contains a redundant check "if: github.ref == 'refs/heads/main' && github.event_name == 'push'"; since this workflow is already triggered only on push events, remove the "&& github.event_name == 'push'" portion and leave "if: github.ref == 'refs/heads/main'" to improve readability (or keep as-is if your team prefers defensive verbosity).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/release-drafter.yml:
- Line 27: The if-condition in the workflow currently contains a redundant check
"if: github.ref == 'refs/heads/main' && github.event_name == 'push'"; since this
workflow is already triggered only on push events, remove the "&&
github.event_name == 'push'" portion and leave "if: github.ref ==
'refs/heads/main'" to improve readability (or keep as-is if your team prefers
defensive verbosity).
⚙️ Related ISSUE Number
close #55
📄 Work Description
기존 CI에서는
pnpm build만 수행되어Vercel 환경에서의 빌드 실패 로그를 계정주가 아니라면 확인하기 어려웠습니다.
이를 개선하기 위해 GitHub Actions에
vercel build단계를 추가하여Vercel과 동일한 빌드 환경을 CI 단계에서 사전 검증하도록 수정했습니다.
이제 배포 실패 원인을 GitHub Actions 로그에서도 확인할 수 있습니다.
📷 Screenshot
x
💬 To Reviewers
Vercel GitHub Integration은 유지한 상태이며,
CI에서는 빌드 검증만 수행합니다.
🔗 Reference