From d4c9c0e6ee24a47898f9826e50324612e219f0cf Mon Sep 17 00:00:00 2001 From: nick <59822256+Archasion@users.noreply.github.com> Date: Sun, 10 May 2026 00:23:18 +0100 Subject: [PATCH] fix(deploy): prepend Bun + PM2 install dirs to PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit appleboy/ssh-action runs a non-interactive non-login shell, so the host's ~/.bashrc and ~/.profile — which is where the Bun installer adds ~/.bun/bin to PATH — never gets sourced. The first `bun` invocation in the deploy script crashes with "command not found" even though Bun is installed. Prepend $HOME/.bun/bin, $HOME/.local/bin, and /usr/local/bin to PATH at the top of the script so `bun` and `pm2` resolve regardless of how the script is invoked. --- scripts/deploy.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 0c0b8ff..dae0cde 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -4,6 +4,12 @@ set -euo pipefail +# appleboy/ssh-action runs a non-interactive non-login shell, so the host's +# ~/.bashrc / ~/.profile (where Bun and PM2 add themselves to PATH) is +# never sourced. Re-add both binaries' default install dirs explicitly so +# `bun` and `pm2` resolve regardless of how this script was invoked. +export PATH="$HOME/.bun/bin:$HOME/.local/bin:/usr/local/bin:$PATH" + BACKUPS_DIR="prisma/backups" KEEP_BACKUPS=10