mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(applications): add watch paths for selective deployments
- Implement watch paths feature for GitHub and GitLab applications and compose services - Add ability to specify paths that trigger deployments when changed - Update database schemas to support watch paths - Integrate micromatch for flexible path matching - Enhance deployment triggers with granular file change detection
This commit is contained in:
9
packages/server/src/utils/watch-paths/should-deploy.ts
Normal file
9
packages/server/src/utils/watch-paths/should-deploy.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import micromatch from "micromatch";
|
||||
|
||||
export const shouldDeploy = (
|
||||
watchPaths: string[] | null,
|
||||
modifiedFiles: string[],
|
||||
): boolean => {
|
||||
if (!watchPaths || watchPaths?.length === 0) return true;
|
||||
return micromatch.some(modifiedFiles, watchPaths);
|
||||
};
|
||||
Reference in New Issue
Block a user