Skip to content

Commit

Permalink
🐛 fix: AWS SSM 실행 jobs 로 분리 #258
Browse files Browse the repository at this point in the history
  • Loading branch information
Han-Joon-Hyeok committed Oct 6, 2024
1 parent 3937d68 commit 55ed359
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
body: ${{ steps.tag_version.outputs.changelog }}

build-spring-and-docker-image:
needs: ["create-release"]
needs: [ "create-release" ]
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
deploy-new-container:
runs-on: ubuntu-latest
needs: ["create-release", "build-spring-and-docker-image"]
needs: [ "create-release", "build-spring-and-docker-image" ]
steps:
- name: Deploy a new version of the container
uses: peterkimzz/aws-ssm-send-command@master
Expand All @@ -93,6 +93,10 @@ jobs:
command: /bin/bash ./git-pull.sh; /bin/bash ./deploy.sh "${{ secrets.DOCKERHUB_ACCOUNT }}/${{ secrets.DOCKERHUB_REPOSITORY }}:${{ needs.create-release.outputs.new_tag }}"
comment: Deploy a New Version of the Container

switching-blue-green-traffic:
runs-on: ubuntu-latest
needs: [ "deploy-new-container" ]
steps:
- name: Change the backend container server in nginx
uses: peterkimzz/aws-ssm-send-command@master
id: ssm-change-nginx-server
Expand All @@ -106,6 +110,10 @@ jobs:
command: /bin/bash ./deploy.sh
comment: Change the backend container server in nginx

turn-off-previous-container:
runs-on: ubuntu-latest
needs: [ "switching-blue-green-traffic" ]
steps:
- name: Turn off the previous container
uses: peterkimzz/aws-ssm-send-command@master
id: ssm-turn-off-previous-container
Expand Down

0 comments on commit 55ed359

Please sign in to comment.