Skip to content

Commit f3eb35e

Browse files
committed
modified yaml deploy script
1 parent 24409e3 commit f3eb35e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@ jobs:
1717
username: ${{ secrets.VPS_USERNAME }}
1818
key: ${{ secrets.SSH_PRIVATE_KEY }}
1919
script: |
20-
2120
echo "[INFO] Stopping and removing running container (if exists)..."
2221
docker rm -f codeboxes-server || true
2322
2423
echo "[INFO] Pruning unused Docker networks..."
2524
docker network prune -f
26-
25+
2726
echo "[INFO] Waiting for port 8080 to be released..."
28-
sleep 5
27+
while lsof -i :8080 >/dev/null 2>&1; do
28+
echo "[INFO] Port 8080 still in use. Waiting..."
29+
sleep 2
30+
done
2931
3032
echo "[INFO] Cloning latest code..."
3133
rm -rf codeboxes-server

0 commit comments

Comments
 (0)