chore: improve local deploy helper feedback

This commit is contained in:
Md Bayazid Bostame
2026-03-29 00:34:19 +01:00
parent b7a2d84b45
commit cd0c0ad65a
3 changed files with 16 additions and 4 deletions

View File

@@ -23,6 +23,13 @@ fi
echo "Updating local branch from origin/develop..."
git pull --ff-only origin develop
echo "Checking remote env file..."
$SSH_CMD "$DEPLOY_HOST" "test -f '$DEPLOY_PATH/$REMOTE_ENV_FILE'" || {
echo "Missing remote env file: $DEPLOY_PATH/$REMOTE_ENV_FILE" >&2
echo "Create or restore the server env file before deploying." >&2
exit 1
}
echo "Syncing repository to ${DEPLOY_HOST}:${DEPLOY_PATH} ..."
rsync -az --delete \
--filter 'P .env.test' \
@@ -44,4 +51,7 @@ $SSH_CMD "$DEPLOY_HOST" \
echo "Verifying health endpoint..."
curl --fail --silent --show-error --max-time 10 "$HEALTH_URL" >/dev/null
commit_sha="$(git rev-parse --short HEAD)"
echo "Test deployment healthy: $HEALTH_URL"
echo "Deployed commit: $commit_sha"
echo "Branch: $current_branch"