Skip to content

Commit

Permalink
updated deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
kayprogrammer committed Dec 23, 2024
1 parent 3507d47 commit 824426e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
env:
VPS_IP: ${{ secrets.VPS_IP }}
run: |
health_status=$(sshpass -p "${{ secrets.SSH_PASSPHRASE }}" ssh -o StrictHostKeyChecking=no docker@${VPS_IP} << 'EOF'
health_status=$(sshpass -p "${{ secrets.SSH_PASSPHRASE }}" ssh -o StrictHostKeyChecking=no -T docker@${VPS_IP} << 'EOF'
container_id=$(docker ps -q -f name=api)
if [ -z "$container_id" ]; then
echo "No container found with name 'api'."
Expand All @@ -101,6 +101,9 @@ jobs:
fi
EOF
)
echo "Health Status: $health_status"
if [[ "$health_status" != "\"healthy\"" ]]; then
echo "API container is unhealthy! Status: $health_status"
exit 1
Expand Down

0 comments on commit 824426e

Please sign in to comment.