-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MATE-85 : [FIX] deploy.yml 파일 수정하여 배포
- 1. 별도의 SCP(Secure Copy) 액션 사용
- Loading branch information
Showing
1 changed file
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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: | | ||
|