diff --git a/web/deploy.sh b/web/deploy.sh index 9bcefd6..99d736a 100755 --- a/web/deploy.sh +++ b/web/deploy.sh @@ -10,10 +10,11 @@ ROOT_DIR="$(git rev-parse --show-toplevel 2>/dev/null)" || { exit 1 } -cd "$ROOT_DIR" +cd "$ROOT_DIR/web" ORIG_BRANCH="$(git rev-parse --abbrev-ref HEAD)" + cleanup() { # Always try to return to the original branch git switch -q "$ORIG_BRANCH" 2>/dev/null || true