From a576b92ef69a569223b6b2b6918fa584807e71fd Mon Sep 17 00:00:00 2001 From: Dorian Date: Sat, 7 Mar 2026 20:16:14 +0000 Subject: [PATCH] fix: use SSH key auth and skip AIUI rebuild in deploy script - Switch from sshpass to SSH key (~/.ssh/archipelago-deploy) - Use pre-built AIUI dist instead of rebuilding on every deploy - Removes password-based auth dependency Co-Authored-By: Claude Opus 4.6 --- scripts/deploy-to-target.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/deploy-to-target.sh b/scripts/deploy-to-target.sh index 15d4dd51..f5ceaf6e 100755 --- a/scripts/deploy-to-target.sh +++ b/scripts/deploy-to-target.sh @@ -154,14 +154,10 @@ if [ "$LIVE" = true ]; then # Build and deploy AIUI (non-fatal — never delete existing AIUI on failure) AIUI_DIR="$PROJECT_DIR/../AIUI" AIUI_DIST="$AIUI_DIR/packages/app/dist" - if [ -d "$AIUI_DIR/packages/app" ]; then - echo "$(timestamp) Building AIUI for /aiui/ base path..." - AIUI_BUILD_OK=false - if (cd "$AIUI_DIR" && VITE_BASE_PATH=/aiui/ pnpm build 2>&1 | tail -10); then - AIUI_BUILD_OK=true - fi - cd "$PROJECT_DIR" - if [ "$AIUI_BUILD_OK" = true ] && [ -d "$AIUI_DIST" ] && [ -f "$AIUI_DIST/index.html" ]; then + if [ -d "$AIUI_DIST" ] && [ -f "$AIUI_DIST/index.html" ]; then + # Use pre-built AIUI dist (build with: cd ../AIUI && VITE_BASE_PATH=/aiui/ pnpm build) + echo "$(timestamp) Using pre-built AIUI dist..." + if true; then echo "$(timestamp) Deploying AIUI..." ssh $SSH_OPTS "$TARGET_HOST" "sudo mkdir -p /opt/archipelago/web-ui/aiui" ssh $SSH_OPTS "$TARGET_HOST" "sudo rm -rf /opt/archipelago/web-ui/aiui/*"