Skip to content

MATE-85 : [FIX] yml 파일 수정 #5

MATE-85 : [FIX] yml 파일 수정

MATE-85 : [FIX] yml 파일 수정 #5

Workflow file for this run

name: Deploy To EC2
on:
push
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: SSH로 EC2에 접속하기
uses: appleboy/[email protected]
env:
APPLICATION_PROPERTIES: ${{ secrets.APPLICATION_PROPERTIES }}
NAVER_CLIENT_ID: ${{ secrets.NAVER_CLIENT_ID }}
NAVER_REDIRECT_URI: ${{ secrets.NAVER_REDIRECT_URI }}
NAVER_CLIENT_SECRET: ${{ secrets.NAVER_CLIENT_SECRET }}
JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }}
OPENWEATHER_API_KEY: ${{ secrets.OPENWEATHER_API_KEY }}
with:
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
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 &