ci(gitea): guard deploy sync when NODA1 origin is not deploy-safe

This commit is contained in:
Apple
2026-03-05 11:35:56 -08:00
parent 1ff24fdb10
commit 526738dd75
2 changed files with 4 additions and 0 deletions

View File

@@ -100,8 +100,11 @@ jobs:
"${SSH_USER}@${SSH_HOST}" \
"set -euo pipefail; \
cd /opt/microdao-daarion; \
origin_url=\$(git remote get-url origin 2>/dev/null || true); \
if [ -n \"\$(git status --porcelain)\" ]; then \
echo 'WARN: dirty git tree on NODA1; skip checkout/pull and continue with gate'; \
elif ! printf '%s' \"\$origin_url\" | grep -Eq 'daarion-admin/microdao-daarion(\\.git)?$'; then \
echo \"WARN: origin remote (\$origin_url) is not deploy-safe; skip checkout/pull and continue with gate\"; \
else \
git fetch origin; \
git checkout '${DEPLOY_REF:-main}'; \