feat: Vercel 배포 워크플로우 추가 및 프로덕션/프리뷰 환경 분리 #64#65
Conversation
WalkthroughGitHub Actions 배포 워크플로우가 "Deploy to Vercel"로 이름이 변경되고, main 브랜치와 stage 브랜치에 각각 production, preview 배포를 수행하는 두 개의 별도 job으로 분리되었습니다. 각 job은 브랜치 조건에 따라 실행되며, 배포 환경 설정이 명확히 구분되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant GitHub as GitHub Actions
participant Vercel as Vercel
Dev->>GitHub: Push to main
GitHub->>GitHub: Trigger deploy-production job
GitHub->>Vercel: Deploy with PRODUCTION=true, eatda.net, env=Production
Dev->>GitHub: Push to stage
GitHub->>GitHub: Trigger deploy-preview job
GitHub->>Vercel: Deploy with PRODUCTION=false, dev.eatda.net, env=Preview
Assessment against linked issues
Possibly related PRs
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
🎨 Storybook Preview: https://685a32a1c0bbd269fdb67af4-sadnnxfukr.chromatic.com/ |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.github/workflows/deploy.yml (3)
8-11: 동시 실행 충돌 방지를 위한concurrency블록 권장배포 작업이 중복 실행되면 Vercel 측 대기열이 길어지거나 이전 배포가 취소되지 않을 수 있습니다.
다음과 같이 job 단에concurrency를 추가하면 동일 브랜치의 이전 배포를 자동 취소할 수 있습니다.deploy-production: if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest + concurrency: + group: production-${{ github.ref }} + cancel-in-progress: true프리뷰 job에도 동일 패턴을 적용해 주세요.
15-25: GitHub Environment를 지정하면 승인 & 비밀키 관리를 강화할 수 있습니다Production 배포에 대해
environment: production을 선언하면
• 환경별 시크릿을 분리해 저장소 - 레벨 시크릿 노출을 줄이고
• 필요 시 환경 승인(Required reviewers) 플로우를 사용할 수 있습니다.deploy-production: if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest + environment: productionPreview 배포에도
environment: preview를 두면 좋습니다.
27-31: Preview job에도concurrency와environment설정을 맞춰주세요Production과 동일하게 중복 배포 취소와 환경-별 시크릿 분리를 적용해 일관성을 유지하는 것이 좋습니다.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/deploy.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: test
🔇 Additional comments (2)
.github/workflows/deploy.yml (2)
3-6: PR 단위 프리뷰 배포 트리거가 제거되었습니다
pull_request이벤트가 빠지면서 브랜치-푸시만 감지합니다.
PR 생성 시에도 프리뷰 배포(특히stage브랜치로의 머지 전)-URL이 필요하다면on: pull_request트리거를 유지하거나 별도 워크플로로 두는 것을 검토해 주세요.
34-44:ALIAS_DOMAINS다중 도메인 지원 여부 확인 필요
mountainash/deploy-to-vercel-actionv2.5.0에서 쉼표 구분 다중 도메인을 허용하지 않는 이슈가 보고된 바 있습니다.
추가 도메인이 필요하다면 action 릴리스 노트를 재확인하고 최신 버전으로 업그레이드할지 검토해 주세요.
✅ 이슈 번호
close #64
🪄 작업 내용 (변경 사항)
📸 스크린샷
💡 설명
🗣️ 리뷰어에게 전달 사항
제발 되길 바라며 머지 해볼까요?
📍 트러블 슈팅
Summary by CodeRabbit