Fix Windows/WSL production deploy hang and permissions.

Skip slow Git worktree walks on /mnt, run Vite on Windows npm, reuse Windows SSH keys, and stop rewriting the klevze-owned public app symlink that skinbase cannot replace.
This commit is contained in:
2026-08-29 12:25:50 +02:00
parent bf9ca12469
commit ab8fa6d845
12 changed files with 1557 additions and 140 deletions
+14 -1
View File
@@ -316,7 +316,20 @@ fi
log_step "Switching current release to ${target_release}"
ln -sfn "$target_release_path" "$current_link"
ln -sfn "$current_link" "$REMOTE_FOLDER"
# The public app path is a klevze-owned symlink to .../releases/current. Rewriting
# current is enough; ln on REMOTE_FOLDER fails with Permission denied for skinbase.
if [[ -L "$REMOTE_FOLDER" ]]; then
literal="$(readlink -n "$REMOTE_FOLDER" || true)"
if [[ "$literal" != "$current_link" ]]; then
resolved="$(readlink -f "$REMOTE_FOLDER" 2>/dev/null || true)"
expected="$(readlink -f "$current_link" 2>/dev/null || true)"
if [[ -z "$resolved" || -z "$expected" || "$resolved" != "$expected" ]]; then
ln -sfn "$current_link" "$REMOTE_FOLDER" || die "Cannot retarget ${REMOTE_FOLDER} to ${current_link} (parent directory not writable by $(id -un)). The current symlink was updated; fix the public app symlink as the SSH login user if needed."
fi
fi
elif [[ ! -e "$REMOTE_FOLDER" ]]; then
ln -sfn "$current_link" "$REMOTE_FOLDER" || die "Cannot create ${REMOTE_FOLDER} -> ${current_link}. Create that symlink as the SSH login user."
fi
cd "$REMOTE_FOLDER"