From 471be205cec6dd9dc2848d6a18b8a1b36789fa02 Mon Sep 17 00:00:00 2001 From: kylo <103489352+kylo-dev@users.noreply.github.com> Date: Wed, 24 Apr 2024 19:23:36 +0900 Subject: [PATCH] Update github-actions.yml --- .github/workflows/github-actions.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 0945290e..b678dda7 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -20,7 +20,7 @@ jobs: - name: Docker build and Push run: | - docker build -t ${{ secrets.DOCKER_USERNAME }}/meetfolio-web:latest . + docker build -t ${{ secrets.DOCKER_USERNAME }}/meetfolio-web:latest --build-arg NEXT_PUBLIC_SERVER=${{ secrets.NEXT_PUBLIC_SERVER }} --build-arg NEXT_PUBLIC_NEXT_SERVER=${{ secrets.NEXT_PUBLIC_NEXT_SERVER }} . docker push ${{secrets.DOCKER_USERNAME}}/meetfolio-web:latest - name: Deploy in GCP @@ -30,12 +30,8 @@ jobs: username: ${{ secrets.SSH_USERNAME }} key: ${{ secrets.SSH_PRIVATE_KEY }} script: | - echo "NEXT_PUBLIC_SERVER=${{ secrets.NEXT_PUBLIC_SERVER }}" > .env.local - echo "NEXT_PUBLIC_NEXT_SERVER=${{ secrets.NEXT_PUBLIC_NEXT_SERVER }}" >> .env.local - echo "TZ=Asia/Seoul" >> .env.local - cat .env.local sudo docker pull ${{ secrets.DOCKER_USERNAME }}/meetfolio-web:latest sudo docker tag ${{ secrets.DOCKER_USERNAME }}/meetfolio-web:latest meetfolio-web:latest sudo docker rm -f meetfolio-web - sudo docker run -d --name meetfolio-web --env-file .env.local -e PORT=60005 -p 60005:60005 meetfolio-web:latest + sudo docker run -d --name meetfolio-web -e TZ=Asia/Seoul -e PORT=60005 -p 60005:60005 meetfolio-web:latest docker image prune -af