diff --git a/scripts/deploy-hook.php b/scripts/deploy-hook.php index 2de76bf..9ebfe00 100644 --- a/scripts/deploy-hook.php +++ b/scripts/deploy-hook.php @@ -32,7 +32,9 @@ if ($ref !== 'refs/heads/main') { } // Fire-and-forget — respond immediately, deploy runs in background -$cmd = 'nohup ' . escapeshellarg(DEPLOY_SCRIPT) . ' >> ' . escapeshellarg(LOG_FILE) . ' 2>&1 &'; +// Use full paths to avoid PATH issues in PHP-FPM minimal environment. +$cmd = '/usr/bin/nohup /usr/bin/bash ' . escapeshellarg(DEPLOY_SCRIPT) + . ' >> ' . escapeshellarg(LOG_FILE) . ' 2>&1 &'; shell_exec($cmd); echo json_encode(['ok' => true, 'deploying' => true, 'ref' => $ref]);