diff --git a/update.sh b/update.sh index 456d0f1..6a98a25 100755 --- a/update.sh +++ b/update.sh @@ -104,7 +104,9 @@ log "Backend eingespielt" info "Spiele Frontend ein (standalone)..." mkdir -p "$FRONTEND_DIR" -rsync -a --delete "$BUILD_DIR/.next/standalone/" "$FRONTEND_DIR/" +# Next.js standalone mirrors the absolute build path — find the dir that contains server.js +STANDALONE_ROOT=$(dirname "$(find "$BUILD_DIR/.next/standalone" -name "server.js" | head -1)") +rsync -a --delete "$STANDALONE_ROOT/" "$FRONTEND_DIR/" mkdir -p "$FRONTEND_DIR/.next/static" rsync -a --delete "$BUILD_DIR/.next/static/" "$FRONTEND_DIR/.next/static/" if [[ -d "$BUILD_DIR/public" ]]; then