fix: webhooks should not run if server is not functional
This commit is contained in:
parent
6266a5e500
commit
c76a1b1ba5
1 changed files with 5 additions and 0 deletions
|
|
@ -119,6 +119,11 @@
|
||||||
return response('Nothing to do. No applications found.');
|
return response('Nothing to do. No applications found.');
|
||||||
}
|
}
|
||||||
foreach ($applications as $application) {
|
foreach ($applications as $application) {
|
||||||
|
$isFunctional = $application->destination->server->isFunctional();
|
||||||
|
if (!$isFunctional) {
|
||||||
|
ray('Server is not functional: ' . $application->destination->server->name);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($x_github_event === 'push') {
|
if ($x_github_event === 'push') {
|
||||||
if ($application->isDeployable()) {
|
if ($application->isDeployable()) {
|
||||||
ray('Deploying ' . $application->name . ' with branch ' . $branch);
|
ray('Deploying ' . $application->name . ' with branch ' . $branch);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue