Skip to content

fix: contextLoad

fix: contextLoad #16

Workflow file for this run

name: Deploy To Ec2
on:
push:
branches:
- main
jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- name: SSH로 EC2에 접속하기!
uses: appleboy/[email protected]
env:
APPLICATION_PROD_PROPERTIES: ${{ secrets.APPLICATION_PROPERTIES }}
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
script-stop: true
script: |
cd /home/ubuntu/backend
git pull origin main
echo "${{ secrets.APPLICATION_PROD_PROPERTIES }}" > src/main/resources/application-prod.yml
cat src/main/resources/application-prod.yml
./gradlew clean build
sudo fuser -k -n tcp 8080 || true
nohup java -jar build/libs/*SNAPSHOT.jar > ./output.log 2>&1 &