From ff0db3a97ce23249c25e34090281094afcb93dd9 Mon Sep 17 00:00:00 2001 From: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Date: Thu, 28 Sep 2023 20:40:02 +0400 Subject: [PATCH] Redirect is also representative of healthy --- .github/workflows/docker-build-push-dockerhub.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-push-dockerhub.yml b/.github/workflows/docker-build-push-dockerhub.yml index a0154b8f9..16990a52d 100644 --- a/.github/workflows/docker-build-push-dockerhub.yml +++ b/.github/workflows/docker-build-push-dockerhub.yml @@ -141,7 +141,7 @@ jobs: for i in {1..1200}; do echo "Checking server health ($i/1200)..." response=$(curl --silent --fail --write-out "%{http_code}" -v ${{ env.NEXT_PUBLIC_WEBAPP_URL }}/auth/login) - if [[ "$response" == "200" ]]; then + if [[ "$response" == "200" ]] || [[ "$response" == "307" ]]; then echo "Server is healthy" # Now, shutdown the server kill $server_pid