Files
dokploy/packages/server/src/utils/watch-paths/should-deploy.ts
Mauricio Siu c1aeb828d8 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
2025-03-08 23:32:08 -06:00

10 lines
254 B
TypeScript

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);
};