Skip to content

Commit

Permalink
chore: 2개의 EC2로 배포하도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
HiiWee committed Aug 29, 2024
1 parent de88c3e commit 124e5b9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/dev_code_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ jobs:
- name: Add SSH fixkey to known hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
ssh-keyscan ${{ secrets.DEV_ONE_FIRST_SSH_HOST }} >> ~/.ssh/known_hosts
ssh-keyscan ${{ secrets.DEV_ONE_SECOND_SSH_HOST }} >> ~/.ssh/known_hosts
- name: Create SSH key
run: |
Expand All @@ -50,5 +51,7 @@ jobs:
env:
ACTIVE_PROFILE: dev
run: |
scp -i private_key ./build/libs/*.jar ${{ secrets.SSH_FULL_INFO }}:~/
ssh -i private_key ${{ secrets.SSH_FULL_INFO }} "sudo bash ${{ secrets.SCRIPT_PATH }} $ACTIVE_PROFILE"
scp -i private_key ./build/libs/*.jar ${{ secrets.DEV_ONE_FIRST_SSH_FULL_INFO }}:~/
scp -i private_key ./build/libs/*.jar ${{ secrets.DEV_ONE_SECOND_SSH_FULL_INFO }}:~/
ssh -i private_key ${{ secrets.DEV_ONE_FIRST_SSH_FULL_INFO }} "sudo bash ${{ secrets.SCRIPT_PATH }} $ACTIVE_PROFILE"
ssh -i private_key ${{ secrets.DEV_ONE_SECOND_SSH_FULL_INFO }} "sudo bash ${{ secrets.SCRIPT_PATH }} $ACTIVE_PROFILE"

0 comments on commit 124e5b9

Please sign in to comment.