diff --git a/app/Livewire/Project/Application/Heading.php b/app/Livewire/Project/Application/Heading.php index 2c20926a3..7aa8041a4 100644 --- a/app/Livewire/Project/Application/Heading.php +++ b/app/Livewire/Project/Application/Heading.php @@ -94,8 +94,19 @@ public function deploy(bool $force_rebuild = false) return; } + $this->setDeploymentUuid(); + $result = queue_application_deployment( + application: $this->application, + deployment_uuid: $this->deploymentUuid, + force_rebuild: $force_rebuild, + ); + if ($result['status'] === 'skipped') { + $this->dispatch('success', 'Deployment skipped', $result['message']); - // Reset restart count on deployment + return; + } + + // Reset restart count on successful deployment $this->application->update([ 'restart_count' => 0, 'last_restart_at' => null,