Skip to content

Commit

Permalink
MATE-85 : [FIX] deploy.yml 파일 변경
Browse files Browse the repository at this point in the history
- 1. EC2에서 직접 빌드하지 않고, GitHub Actions에서 빌드한 jar 파일을 EC2로 전송
  • Loading branch information
juchan204 committed Dec 4, 2024
1 parent f577056 commit 70c4c78
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,13 @@ jobs:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
envs: |
APPLICATION_PROPERTIES
NAVER_CLIENT_ID
NAVER_REDIRECT_URI
NAVER_CLIENT_SECRET
JWT_SECRET_KEY
OPENWEATHER_API_KEY
source: "build/libs/*SNAPSHOT.jar"
target: "/home/ubuntu/WEB1_2_PitchingMate_BE"
strip_components: 2
envs: APPLICATION_PROPERTIES
script_stop: true
script: |
cd /home/ubuntu/WEB1_2_PitchingMate_BE
git pull origin develop
echo "$APPLICATION_PROPERTIES" > src/main/resources/application-dev.yml
./gradlew clean build
sudo fuser -k -n tcp 8080 || true
nohup java -jar build/libs/*SNAPSHOT.jar > ./output.log 2>&1 &
nohup java -jar *SNAPSHOT.jar > ./output.log 2>&1 &

0 comments on commit 70c4c78

Please sign in to comment.