diff --git a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Deployment.php b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Deployment.php index 3f39ac9018..c30f960262 100644 --- a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Deployment.php +++ b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Deployment.php @@ -576,9 +576,17 @@ trait Deployment return false; } - $pathTrigger = new BuildTrigger($resource->getAttribute('providerPaths', [])); - foreach ($providerAffectedFiles as $file) { - if (!$pathTrigger->isValid($file)) { + $providerPaths = $resource->getAttribute('providerPaths', []); + if (!empty($providerPaths) && !empty($providerAffectedFiles)) { + $pathTrigger = new BuildTrigger($providerPaths); + $pathMatched = false; + foreach ($providerAffectedFiles as $file) { + if ($pathTrigger->isValid($file)) { + $pathMatched = true; + break; + } + } + if (!$pathMatched) { Span::add("{$logBase}.build.skipped.reason", 'path'); return false; }