ops(deploy): default Azure VM deploy to pull from heicode-win remote
bin/azure_vm_deploy.sh pulled from `origin` (xiaohei/heicode.git) when GIT_REF was set. Production VM now tracks heicode-win/main and that's where the rebrand + bug fixes ship — pulling from origin would silently revert all of it on the next deploy. New GIT_REMOTE env var (defaults to heicode-win) lets operators override for one-off cherry-pick deploys. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,11 @@ HEALTH_URL="${HEALTH_URL:-http://127.0.0.1:3000/api/status}"
|
||||
COMPOSE_FILES="${COMPOSE_FILES:--f docker-compose.azure-vm.yml -f docker-compose.override.yml}"
|
||||
ENV_FILE="${ENV_FILE:-.env}"
|
||||
SSH_OPTS="${SSH_OPTS:-}"
|
||||
# Prod VM tracks heicode-win/main (chenchen/heicode-win.git). The legacy
|
||||
# `origin` remote (xiaohei/heicode.git) does not receive the rebrand + bug
|
||||
# fixes that ship to production. Override to "origin" only for one-off
|
||||
# cherry-pick deployments.
|
||||
GIT_REMOTE="${GIT_REMOTE:-heicode-win}"
|
||||
GIT_REF="${GIT_REF:-}"
|
||||
|
||||
if [[ -z "${VM_HOST}" ]]; then
|
||||
@@ -47,9 +52,9 @@ ${SSH} "cd '${REMOTE_DIR}' && \
|
||||
|
||||
if [[ -n "${GIT_REF}" ]]; then
|
||||
${SSH} "cd '${REMOTE_DIR}' && \
|
||||
git fetch --prune origin && \
|
||||
git fetch --prune ${GIT_REMOTE} && \
|
||||
git checkout '${GIT_REF}' && \
|
||||
git pull --ff-only origin '${GIT_REF}'"
|
||||
git pull --ff-only ${GIT_REMOTE} '${GIT_REF}'"
|
||||
fi
|
||||
|
||||
# Persist previous image for rollback.
|
||||
|
||||
Reference in New Issue
Block a user