File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1515 password : ${{secrets.DOCKERHUB_TOKEN}} # 도커 허브 access token
1616 - name : Build and Release
1717 run : |
18- docker build -t ${{secrets.DOCKERHUB_REPO}} .
18+ docker build \
19+ --build-arg VITE_API_URL=${{ secrets.VITE_API_URL }} \
20+ -t ${{secrets.DOCKERHUB_REPO}} .
1921 docker tag ${{secrets.DOCKERHUB_REPO}}:latest ${{secrets.DOCKERHUB_USERNAME}}/${{secrets.DOCKERHUB_REPO}}:latest
2022 docker push ${{secrets.DOCKERHUB_USERNAME}}/${{secrets.DOCKERHUB_REPO}}:latest
2123 - name : Deploy to server
Original file line number Diff line number Diff line change @@ -13,7 +13,12 @@ RUN npm ci
1313# 소스 코드 복사
1414COPY . .
1515
16+ # build-time ARG 정의
17+ ARG VITE_API_URL
18+ ENV VITE_API_URL=$VITE_API_URL
19+
1620# Vite로 빌드
21+ RUN echo "VITE_API_URL=$VITE_API_URL"
1722RUN npm run build
1823
1924# 2단계: 프로덕션 스테이지
You can’t perform that action at this time.
0 commit comments