getDeployScriptPath(); if (null === $relativePath) { return [ 'success' => false, 'output' => 'Deploy script path is not configured.', 'exitCode' => 1, ]; } $scriptPath = $this->pathResolver->resolve($relativePath); if (!file_exists($scriptPath)) { return [ 'success' => false, 'output' => sprintf('Deploy script not found: %s', $scriptPath), 'exitCode' => 1, ]; } $process = new Process( ['bash', $scriptPath, $tag], dirname($scriptPath), ); $process->setTimeout(300); $process->run(); return [ 'success' => $process->isSuccessful(), 'output' => $process->getOutput() . $process->getErrorOutput(), 'exitCode' => $process->getExitCode() ?? 1, ]; } }