fix deploy error without script (#420)

This commit is contained in:
Saeed Vaziry 2025-01-05 04:02:17 -08:00 committed by GitHub
parent a320e52dbf
commit ab43dfb2a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);