Skip to content

Commit

Permalink
config: 프로덕션 배포 시 NEXT_PUBLIC_BASE_URL 환경 변수 주입
Browse files Browse the repository at this point in the history
[#2]
  • Loading branch information
YuHyun-P authored and flydog98 committed Dec 14, 2023
1 parent 8a7281d commit 4ba8530
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/frontend-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "frontend-docker-build"
on:
push:
branches: [ "dev-fe" ]

jobs:
build:
name: Build and Test
Expand All @@ -25,7 +25,7 @@ jobs:
run: yarn install

- name: Build
run: |
run: |
cd packages/frontend
yarn build
Expand Down Expand Up @@ -53,6 +53,8 @@ jobs:
file: ./packages/frontend/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/git-challenge-frontend:0.1
build-args: |
NEXT_PUBLIC_BASE_URL=${{ secrets.NEXT_PUBLIC_BASE_URL }}
deploy:
name: Deploy Frontend
Expand Down
3 changes: 3 additions & 0 deletions packages/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM node:18.17.1

ARG NEXT_PUBLIC_BASE_URL
ENV NEXT_PUBLIC_BASE_URL=$NEXT_PUBLIC_BASE_URL

WORKDIR /app

COPY . .
Expand Down

0 comments on commit 4ba8530

Please sign in to comment.