Skip to content

feat: Vercel 배포 워크플로우 추가 및 프로덕션/프리뷰 환경 분리 #64#65

Merged
Seojunhwan merged 1 commit intomainfrom
feature/PRODUCT-130
Jul 3, 2025
Merged

feat: Vercel 배포 워크플로우 추가 및 프로덕션/프리뷰 환경 분리 #64#65
Seojunhwan merged 1 commit intomainfrom
feature/PRODUCT-130

Conversation

@Seojunhwan
Copy link
Member

@Seojunhwan Seojunhwan commented Jul 3, 2025

✅ 이슈 번호

close #64


🪄 작업 내용 (변경 사항)

  • production / stage 분리하는 작업

📸 스크린샷


💡 설명


🗣️ 리뷰어에게 전달 사항

제발 되길 바라며 머지 해볼까요?


📍 트러블 슈팅

Summary by CodeRabbit

  • Chores
    • GitHub Actions 배포 워크플로우 이름이 "Deploy to Vercel"로 변경되었습니다.
    • 배포 워크플로우가 production과 preview로 분리되어 각각 main 및 stage 브랜치에만 동작하도록 개선되었습니다.
    • 각 배포 작업의 단계가 명확하게 지정되고, 배포 환경 및 도메인 설정이 명확해졌습니다.

@coderabbitai
Copy link

coderabbitai bot commented Jul 3, 2025

Walkthrough

GitHub Actions 배포 워크플로우가 "Deploy to Vercel"로 이름이 변경되고, main 브랜치와 stage 브랜치에 각각 production, preview 배포를 수행하는 두 개의 별도 job으로 분리되었습니다. 각 job은 브랜치 조건에 따라 실행되며, 배포 환경 설정이 명확히 구분되었습니다.

Changes

파일/경로 변경 요약
.github/workflows/deploy.yml 워크플로우 이름 변경, production/preview 배포 job 분리, 브랜치 조건 명확화, 배포 파라미터 및 step 이름 지정 등 전체 배포 로직 리팩토링

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
Loading

Assessment against linked issues

Objective (Issue No.) Addressed Explanation
stage 브랜치를 개발 환경 배포로 설정 (#64)

Possibly related PRs

  • ci: vercel deploy workflow 추가 (#57) #58: 기존 단일 Vercel 배포 job을 두 개의 명확한 job으로 분리하고 조건 및 네이밍을 개선한 PR로, 동일한 deploy workflow 파일을 직접적으로 수정한 이력이 있습니다.

Poem

배포 토끼가 깡총깡총 뛰어
main은 프로덕션, stage는 프리뷰로
Vercel 향해 두 갈래 길
eatda.net, dev.eatda.net
워크플로우도 깔끔하게 분리
토끼는 오늘도 배포를 즐기네!
🐇🚀


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link

github-actions bot commented Jul 3, 2025

🎨 Storybook Preview: https://685a32a1c0bbd269fdb67af4-sadnnxfukr.chromatic.com/
🔗 Chromatic Build: https://www.chromatic.com/build?appId=685a32a1c0bbd269fdb67af4&number=61
🕖 *Updated at: 2025년 07월 04일 00시 05분 03초

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: production

Preview 배포에도 environment: preview를 두면 좋습니다.


27-31: Preview job에도 concurrencyenvironment 설정을 맞춰주세요

Production과 동일하게 중복 배포 취소와 환경-별 시크릿 분리를 적용해 일관성을 유지하는 것이 좋습니다.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b90b6ce and 0f1bcf4.

📒 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-action v2.5.0에서 쉼표 구분 다중 도메인을 허용하지 않는 이슈가 보고된 바 있습니다.
추가 도메인이 필요하다면 action 릴리스 노트를 재확인하고 최신 버전으로 업그레이드할지 검토해 주세요.

@Seojunhwan Seojunhwan merged commit 7753e05 into main Jul 3, 2025
7 checks passed
@Seojunhwan Seojunhwan deleted the feature/PRODUCT-130 branch July 3, 2025 15:13
@wkdtnqls0506 wkdtnqls0506 added the ✨ feature 새로운 기능 추가 label Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feature 새로운 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PRODUCT-130] 개발 환경 배포

2 participants