Skip to content

Commit fdffacf

Browse files
committed
2 parents 8a4c010 + 2b4e4df commit fdffacf

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
workflow_dispatch:
8-
8+
99
jobs:
1010
build-and-deploy:
1111
runs-on: ubuntu-latest
@@ -41,19 +41,6 @@ jobs:
4141
host: ${{ secrets.EC2_HOST }}
4242
username: ec2-user
4343
key: ${{ secrets.EC2_SSH_KEY }}
44+
4445
script: |
45-
PID=$(pgrep -f 'spring-0.0.1-SNAPSHOT.jar')
46-
if [ ! -z "$PID" ]; then
47-
kill -9 $PID
48-
fi
49-
50-
nohup java \
51-
-Xms128m \
52-
-Xmx256m \
53-
-DDB_URL=${{ secrets.DB_URL }} \
54-
-DDB_USERNAME=${{ secrets.DB_USERNAME }} \
55-
-DDB_PASSWORD=${{ secrets.DB_PASSWORD }} \
56-
-DAPI_KEY=${{ secrets.API_KEY }} \
57-
-DADMIN_CODE=${{ secrets.ADMIN_CODE }}
58-
-jar /home/ec2-user/build/libs/spring-0.0.1-SNAPSHOT.jar > output.log 2>&1 &
59-
46+
/home/ec2-user/run.sh

0 commit comments

Comments
 (0)