From be50eb6bbba3fe2861239d2e313cb9d9889952ca Mon Sep 17 00:00:00 2001 From: eojinny <96863137+eojinny@users.noreply.github.com> Date: Thu, 22 Feb 2024 00:53:37 +0900 Subject: [PATCH] Update prod-apigateway-deploy.yml --- .github/workflows/prod-apigateway-deploy.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/prod-apigateway-deploy.yml b/.github/workflows/prod-apigateway-deploy.yml index a054bfd..8a7b05a 100644 --- a/.github/workflows/prod-apigateway-deploy.yml +++ b/.github/workflows/prod-apigateway-deploy.yml @@ -60,6 +60,16 @@ jobs: docker build -t app . docker tag app ${{ secrets.DOCKER_USERNAME }}/apigateway:latest docker push ${{ secrets.DOCKER_USERNAME }}/apigateway:latest + + - name: Stop and Remove existing Docker containers + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST_PROD_1 }} + username: ec2-user + key: ${{ secrets.PRIVATE_KEY_1 }} + script: | + cd ./BE-APIGateway-Server + docker-compose -f docker-compose-gateway.yml down - name: docker-compose.yml uses: appleboy/scp-action@master