From 04dce63a9d1f9c54e9d50efeac6fc12815fbae36 Mon Sep 17 00:00:00 2001 From: Jaehyeon Date: Fri, 23 Feb 2024 19:36:57 +0900 Subject: [PATCH] Feat(#98): apply blue green deployment --- .github/workflows/jib-build-depoly.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/jib-build-depoly.yml b/.github/workflows/jib-build-depoly.yml index 82cf501..4a02c66 100644 --- a/.github/workflows/jib-build-depoly.yml +++ b/.github/workflows/jib-build-depoly.yml @@ -3,7 +3,7 @@ name: NumberOne-Backend-JIB-BUILD-DEPLOY # event trigger on: push: - branches: [ "dev", "dev-check", "feat/multi-module" ] + branches: [ "dev", "dev-check", "feat/deploy" ] permissions: write-all @@ -120,9 +120,10 @@ jobs: key: ${{ secrets.EC2_PRIVATE_KEY }} envs: GITHUB_SHA script: | - sudo docker rm -f $(docker ps -qa) - sudo docker pull ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_IMAGE }}:latest - docker-compose up -d + sudo docker pull ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_IMAGE }} + sudo chmod 777 ./scripts/deploy.sh + cp ./scripts/deploy.sh ./deploy.sh + ./deploy.sh docker image prune -f ## notify at Slack