INTEGRITY Cloudflare Docs

Build watch paths

When you connect a git repository to Workers, by default a change to any file in the repository will trigger a build. You can configure Workers to include or exclude specific paths to specify if Workers should skip a build for a given path. This can be especially helpful if you are using a monorepo project structure and want to limit the number of builds being kicked off.

Configure Paths

To configure which paths are included and excluded:

  1. In Overview, select your Workers project.
  2. Go to Settings > Build > Build watch paths. Workers will default to setting your project’s includes paths to everything ([*]) and excludes paths to nothing ([]).

The configuration fields can be filled in two ways:

For each path in a push event, build watch paths will be evaluated as follows:

Workers will bypass the path matching for a push event and default to building the project if:

Examples

Example 1

If you want to trigger a build from all changes within a set of directories, such as all changes in the folders project-a/ and packages/

Example 2

If you want to trigger a build for any changes, but want to exclude changes to a certain directory, such as all changes in a docs/ directory

Example 3

If you want to trigger a build for a specific file or specific filetype, for example all files ending in .md.