Skip to content

Commit 4eef93a

Browse files
committed
Update health endpoint in redeploy script
1 parent 9f63476 commit 4eef93a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ jobs:
3535

3636
- name: Redeploy Site
3737
run: |
38-
ssh my-vps '~/redeploy-site.sh' \
38+
ssh my-vps 'sudo ~/redeploy-site.sh' \
3939
ssh my-vps 'yes | cp ~/graph-uf/scripts/redeploy-site.sh ~/redeploy-site.sh'

scripts/redeploy-site.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
set -eo pipefail
55

6-
PROJECT_DIR="$HOME/graph-uf/"
6+
PROJECT_DIR="/home/myuser/graph-uf/"
77
URL="https://www.aleguy02.dev"
88
MAX_RETRIES=5
99

@@ -38,7 +38,7 @@ done
3838
# Health check with retries
3939
retry_count=0
4040
while [ $retry_count -lt $MAX_RETRIES ]; do
41-
if [ "$(curl --head $URL/health | awk '/^HTTP/{print $2}')" = "200" ]; then
41+
if [ "$(curl --head $URL | awk '/^HTTP/{print $2}')" = "200" ]; then
4242
echo "Health check passed"
4343
break
4444
fi
@@ -52,7 +52,7 @@ while [ $retry_count -lt $MAX_RETRIES ]; do
5252
fi
5353
done
5454
if [ $retry_count -eq $MAX_RETRIES ]; then
55-
echo "!! Could not reach the site at $URL/health or received a non-200 HTTP response. !!"
55+
echo "!! Could not reach the site at $URL or received a non-200 HTTP response. !!"
5656
exit 1
5757
fi
5858

0 commit comments

Comments
 (0)