Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,22 @@ jobs:
- name: Check deploy server URL
uses: jtalk/url-health-check-action@v3
with:
url: https://${{ secrets.LIVE_SERVER_IP }}:${{env.STOPPED_PORT}}/env
max-attempts: 5
retry-delay: 10s
username: ubuntu
host: ${{ secrets.LIVE_SERVER_IP }}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
for i in {1..5}; do
STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:${{env.STOPPED_PORT}}/env)
if [ "$STATUS" = "200" ]; then
echo "Health check passed"
exit 0
else
echo "Waiting for app to be ready... ($i/5)"
sleep 10
fi
done
echo "Health check failed"
exit 1

- name: Change nginx upstream
uses: appleboy/ssh-action@master
Expand Down
Loading