Skip to content

feat: add manual k8s preview deployment workflow - #94

Open
khyeon1003 wants to merge 2 commits into
mainfrom
feat/preview_workflow
Open

khyeon1003 wants to merge 2 commits into
mainfrom
feat/preview_workflow

Conversation

@khyeon1003

@khyeon1003 khyeon1003 commented Jun 30, 2026

Copy link
Copy Markdown

작업 내용 정리

  • preview 배포 workflow를 추가
  • workflow_dispatch 기반 수동 실행
  • inputs.deploy_name을 통해 preview 대상 이름을 입력
  • inputs.deploy_env는 optional input으로 처리
    • 값이 있으면 overlays/{deploy_env} 경로를 우선 사용
    • 값이 없거나 해당 경로가 없으면 overlays 경로를 사용
  • latest 태그는 갱신X

환경 변수 처리

  • 기존 배포 workflow와 동일하게 대부분의 환경 변수는 GitHub Secrets 값을 사용
  • 우선 NEXT_PUBLIC_API_BASE_URL만 preview 도메인 규칙에 맞게 별도 처리
NEXT_PUBLIC_API_BASE_URL=https://${{ env.DEPLOY_NAME }}-api${{ inputs.deploy_env && inputs.deploy_env || '' }}.uoslife.com

예시:

  • deploy_name=yonghyeon, deploy_env 없음: https://yonghyeon-api.uoslife.com
  • deploy_name=yonghyeon, deploy_env=dev: https://yonghyeon-apidev.uoslife.com

환경 변수 정리

  • Next.js에서 NEXT_PUBLIC_* 환경 변수는 빌드 시점에 클라이언트 번들에 포함
  • 따라서 Kubernetes ConfigMap 또는 런타임 환경 변수로 같은 값을 주입해도 이미 빌드된 클라이언트 번들의 값은 오버라이딩되지 않는 것으로 파악
  • 이 때문에 preview별 API URL이 필요한 NEXT_PUBLIC_API_BASE_URL은 Docker build 단계에서 명시적으로 주입하도록 처리

@khyeon1003 khyeon1003 self-assigned this Jun 30, 2026
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • Bug

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b50d169c-50df-40d2-a115-0647ce7aac20

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/preview_workflow

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

Comment @coderabbitai help to get the list of available commands.

@khyeon1003
khyeon1003 marked this pull request as ready for review June 30, 2026 15:09
@khyeon1003
khyeon1003 requested a review from marsboy02 June 30, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant