File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 host : ${{ secrets.EC2_HOST }}
3030 username : ${{ secrets.EC2_USER }}
3131 key : ${{ secrets.EC2_SSH_KEY }}
32- source : " build/libs/WhoIs-Server-0.0.1- SNAPSHOT.jar"
32+ source : " build/libs/* SNAPSHOT.jar"
3333 target : " /home/ubuntu/app/"
3434
3535 - name : Restart app on EC2
4040 key : ${{ secrets.EC2_SSH_KEY }}
4141 script : |
4242 pkill -f 'java -jar' || true
43- nohup java -jar /home/ubuntu/app/WhoIs-Server-0.0.1-SNAPSHOT.jar > /home/ubuntu/app/app.log 2>&1 &
43+
44+ export LOCAL_DATASOURCE_URL="${{ secrets.LOCAL_DATASOURCE_URL }}"
45+ export LOCAL_DATASOURCE_USERNAME="${{ secrets.LOCAL_DATASOURCE_USERNAME }}"
46+ export LOCAL_DATASOURCE_PASSWORD="${{ secrets.LOCAL_DATASOURCE_PASSWORD }}"
47+
48+ JAR_FILE=$(ls /home/ubuntu/app/*SNAPSHOT.jar | grep -v plain | head -n 1)
49+ nohup java -jar $JAR_FILE > /home/ubuntu/app/app.log 2>&1 &
50+ exit 0
You can’t perform that action at this time.
0 commit comments