Skip to content

Commit

Permalink
chore: 배포 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
kariskan committed Aug 22, 2024
1 parent 0d2271c commit 446a8c4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ jobs:
run: |
/usr/bin/ssh -o StrictHostKeyChecking=no -i private_key ${USER}@${HOST} << EOF
cd /home/ubuntu
kill $(lsof -t -i:8080)
nohup java -jar storage-0.0.1-SNAPSHOT.jar --spring.profiles.active=local > app.log 2>&1 &
PID=$(lsof -t -i:8080 || echo "")
if [ ! -z "$PID" ]; then
echo "Killing process on port 8080"
kill -9 $PID || echo "Failed to kill process"
else
echo "No process found on port 8080"
fi
sleep 5
nohup java -jar app.jar --spring.profiles.active=local > app.log 2>&1 &
echo "Started new application"
sleep 10
if lsof -i:8080; then
echo "Application is running on port 8080"
else
echo "Application failed to start on port 8080"
exit 1
fi
EOF
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ ResponseEntity<InputStreamResource> download(@PathVariable Long fileId,

@GetMapping("/hi")
public String a() {
return "hihi";
return "bibi";
}

}

0 comments on commit 446a8c4

Please sign in to comment.