Skip to content

Build Filters

Build filters control which file changes trigger automatic deployments from a connected GitHub repository. Use them to skip builds for documentation changes or to deploy apps in a monorepo independently.

  1. Open your app in the FastAPI Cloud dashboard.
  2. Go to Settings and find Build Filters in the Build & Deploy section. A GitHub repository must be connected first.
  3. Click Configure, or Edit if you already have filters.
  4. Use Add included path to choose which files or directories trigger a build. Leave this list empty to include all paths.
  5. Use Add ignored path to exclude changes that should not trigger a build.
  6. Click Save Changes.
Build Filters editor with backend code and dependency files included, and Markdown files ignored. Build Filters editor with backend code and dependency files included, and Markdown files ignored.

Saving filters applies them to future pushes. It does not start a deployment. To remove filters, delete all entries from both lists and save.

When you push to the default branch, FastAPI Cloud looks at every file added, modified, or removed across all commits in the push.

A build runs when at least one changed file meets both conditions:

  1. It matches an included path, or the included list is empty.
  2. It does not match any ignored path.

If a file matches both lists, it is ignored. A push still triggers a build if it changes another file that passes the filters. For example, with all paths included and **/*.md ignored, a push changing only README.md is skipped, while a push changing both README.md and main.py builds.

Each connected app uses its own filters. When no changed files qualify, the push appears in deployment history as Build Skipped. Your current deployment keeps running.

Patterns are relative to the repository root, even if you set an Application Directory. Matching is case-sensitive.

PatternMatches
backendThe file backend, or all files inside that directory, including nested directories.
backend/**All files inside backend, including nested directories.
backend/*.pyPython files directly inside backend, such as backend/main.py. It does not match backend/app/main.py.
**/*.pyPython files anywhere in the repository, including at the root.
README.mdOnly the README.md at the repository root.
**/*.mdMarkdown files anywhere in the repository, including at the root.
uv.lockThe uv.lock file at the repository root.

Use * to match within one path segment and ** to match across directories. A trailing slash, such as backend/, is saved as backend/**.

Use forward slashes and relative paths. Absolute paths, .. segments, and patterns starting with ! are not supported. Add exclusions to Ignored paths. Each list supports up to 50 patterns, with up to 255 characters per pattern.

Leave Included paths empty and add these Ignored paths:

docs/**
**/*.md

A push that only changes documentation is skipped. A push that also changes main.py still builds.

If your app lives in backend, add it to Included paths:

backend/**

If your dependencies are defined at the repository root, also include them:

pyproject.toml
uv.lock

Include shared code or other configuration files your app depends on as needed. Setting the application directory alone does not limit which changes trigger deployments.

To skip Markdown changes within the included directories, add **/*.md to Ignored paths.

Build filters apply to automatic deployments from pushes. Manual deployments, including Deploy latest commit on the Deployments page and fastapi deploy, run regardless of filters.

Empty commits also trigger a build. FastAPI Cloud also skips filter checks when GitHub doesn’t send a complete list of changed files, such as for force pushes, branch creation, or pushes with 2,048 or more commits.