From ab43dfb2a68f17e86f33c923e4afcee5a979dbe9 Mon Sep 17 00:00:00 2001 From: Saeed Vaziry <61919774+saeedvaziry@users.noreply.github.com> Date: Sun, 5 Jan 2025 04:02:17 -0800 Subject: [PATCH] fix deploy error without script (#420) --- app/Web/Pages/Servers/Sites/View.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Web/Pages/Servers/Sites/View.php b/app/Web/Pages/Servers/Sites/View.php index 00ea0f8..fb0f5ed 100644 --- a/app/Web/Pages/Servers/Sites/View.php +++ b/app/Web/Pages/Servers/Sites/View.php @@ -116,6 +116,14 @@ private function deployAction(): Action return Action::make('deploy') ->icon('heroicon-o-rocket-launch') ->action(function () { + if (! $this->site->deploymentScript?->content) { + Notification::make() + ->danger() + ->title('Deployment script is not set!') + ->send(); + + return; + } run_action($this, function () { app(Deploy::class)->run($this->site);