Preserve portal data during repository cutover
Deploy ComfyUI Jobs / deploy (push) Failing after 6s
Test and build ComfyUI Jobs / test-build (push) Successful in 11m4s

This commit is contained in:
2026-10-02 19:39:58 +00:00
parent fe0f2b14c0
commit c9fb2fa320
+4 -1
View File
@@ -32,8 +32,11 @@ jobs:
ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes "${DEPLOY_USER}@${DEPLOY_HOST}" "
set -Eeuo pipefail
mkdir -p '$TARGET_DIR'
if [ ! -d '$TARGET_DIR/.git' ]; then git clone --branch '$BRANCH' --single-branch '$REPO_URL' '$TARGET_DIR'; else cd '$TARGET_DIR' && git remote set-url origin '$REPO_URL' && GIT_SSH_COMMAND='ssh -p 222 -o StrictHostKeyChecking=no' git fetch origin '$BRANCH' && git reset --hard 'origin/$BRANCH' && git clean -fdx; fi
if [ ! -d '$TARGET_DIR/.git' ]; then git init '$TARGET_DIR' && cd '$TARGET_DIR' && git remote add origin '$REPO_URL'; else cd '$TARGET_DIR' && git remote set-url origin '$REPO_URL'; fi
cd '$TARGET_DIR'
GIT_SSH_COMMAND='ssh -p 222 -o StrictHostKeyChecking=no' git fetch origin '$BRANCH'
git reset --hard 'origin/$BRANCH'
git clean -fdx -e data/ -e data/**
docker ps -q --filter publish=$PORT | xargs -r docker rm -f
docker compose -p '$PROJECT' -f docker-compose.yml -f '$COMPOSE_FILE' down --remove-orphans || true
docker compose -p '$PROJECT' -f docker-compose.yml -f '$COMPOSE_FILE' up -d --build