readable scripts

This commit is contained in:
2026-04-25 18:51:18 +08:00
parent 23172c402d
commit 94a1914e9e
4 changed files with 63 additions and 4 deletions
+13 -1
View File
@@ -54,4 +54,16 @@ runs:
)
ssh "${SSH_OPTS[@]}" "$DEPLOY_USER@$DEPLOY_HOST" \
"APP_KEY=$(printf '%q' "$APP_KEY") AUTO_DEPLOY_PATH=$(printf '%q' "$AUTO_DEPLOY_PATH") AUTO_DEPLOY_BRANCH=$(printf '%q' "$AUTO_DEPLOY_BRANCH") bash -se -c 'cd \"\$AUTO_DEPLOY_PATH\"; git checkout \"\$AUTO_DEPLOY_BRANCH\"; git pull --ff-only; git submodule sync --recursive; git submodule update --init --recursive; echo \"[remote] auto-deploy repo updated\"; ./common/deploy.sh abort-pending \"\$APP_KEY\"; echo \"[remote] \$APP_KEY pending deployment aborted\"'"
"APP_KEY=$(printf '%q' "$APP_KEY") \
AUTO_DEPLOY_PATH=$(printf '%q' "$AUTO_DEPLOY_PATH") \
AUTO_DEPLOY_BRANCH=$(printf '%q' "$AUTO_DEPLOY_BRANCH") \
bash -se" << 'EOF'
cd "$AUTO_DEPLOY_PATH"
git checkout "$AUTO_DEPLOY_BRANCH"
git pull --ff-only
git submodule sync --recursive
git submodule update --init --recursive
echo "[remote] auto-deploy repo updated"
./common/deploy.sh abort-pending "$APP_KEY"
echo "[remote] $APP_KEY pending deployment aborted"
EOF