mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-08 01:12:34 +00:00
fix githook deletion
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
* @property array<string, mixed> $actions
|
||||
* @property string $hook_id
|
||||
* @property array<string, mixed> $hook_response
|
||||
* @property Site $site
|
||||
* @property ?Site $site
|
||||
* @property SourceControl $sourceControl
|
||||
*/
|
||||
class GitHook extends AbstractModel
|
||||
|
@ -118,6 +118,11 @@ public static function boot(): void
|
||||
$site->ssls()->delete();
|
||||
$site->deployments()->delete();
|
||||
$site->deploymentScript()->delete();
|
||||
try {
|
||||
$site->gitHook?->destroyHook();
|
||||
} catch (FailedToDestroyGitHook) {
|
||||
$site->refresh()->gitHook?->delete();
|
||||
}
|
||||
});
|
||||
|
||||
static::created(function (Site $site): void {
|
||||
|
Reference in New Issue
Block a user