Skip to content

Commit

Permalink
MATE-85 : [FIX] deploy.yml 파일 수정하여 배포
Browse files Browse the repository at this point in the history
- 1. 별도의 SCP(Secure Copy) 액션 사용
  • Loading branch information
juchan204 committed Dec 4, 2024
1 parent 70c4c78 commit 871d36b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ jobs:
- name: Build with Gradle
run: ./gradlew clean build

- name: Copy jar file to EC2
uses: appleboy/scp-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
source: "build/libs/*SNAPSHOT.jar"
target: "/home/ubuntu/WEB1_2_PitchingMate_BE"
strip_components: 2

- name: SSH로 EC2에 접속하기
uses: appleboy/[email protected]
env:
Expand All @@ -36,9 +46,6 @@ jobs:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
source: "build/libs/*SNAPSHOT.jar"
target: "/home/ubuntu/WEB1_2_PitchingMate_BE"
strip_components: 2
envs: APPLICATION_PROPERTIES
script_stop: true
script: |
Expand Down

0 comments on commit 871d36b

Please sign in to comment.