commit test 6
All checks were successful
Deploy Jody's App / build-and-deploy (push) Successful in 34s
All checks were successful
Deploy Jody's App / build-and-deploy (push) Successful in 34s
This commit is contained in:
@@ -7,6 +7,8 @@ on:
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: vps-host
|
||||
env:
|
||||
CONTACT_HEALTH_URL: https://jodyholt.com/api/health
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -44,12 +46,19 @@ jobs:
|
||||
|
||||
- name: Restart Contact API
|
||||
run: |
|
||||
set -euo pipefail
|
||||
SYSTEMCTL_BIN="/usr/bin/systemctl"
|
||||
if [ ! -x "$SYSTEMCTL_BIN" ]; then
|
||||
SYSTEMCTL_BIN="/bin/systemctl"
|
||||
fi
|
||||
sudo -n "$SYSTEMCTL_BIN" restart jody-contact-api
|
||||
sudo -n "$SYSTEMCTL_BIN" is-active --quiet jody-contact-api
|
||||
echo "jody-contact-api service is active"
|
||||
|
||||
- name: Health Check Contact API
|
||||
run: curl --fail --silent http://127.0.0.1:8787/health
|
||||
run: |
|
||||
curl --fail --show-error --silent \
|
||||
--retry 8 \
|
||||
--retry-delay 2 \
|
||||
--retry-all-errors \
|
||||
"$CONTACT_HEALTH_URL"
|
||||
|
||||
Reference in New Issue
Block a user