Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .optimize-cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@
"static/images/blog/announcing-deployment-retention/cover.png": "e6c59f73d83c1b88aed82a8974df97de83ab653241a5717f20b407809fa46ba9",
"static/images/blog/announcing-email-policies/cover.png": "3b62c98a38e16bbf4446624035e89e4ee2aba0af636c9ff32a0d2d5ab56d4e2c",
"static/images/blog/announcing-encrypted-string-attributes/cover.png": "f3d1d0a022771392019c760c6dcf88fc231a7f96d19e2eb61d89b3605e818463",
"static/images/blog/announcing-git-deployment-triggers/build-triggers.png": "c388a45677ff90b0ff5a651ea6182094a23ae139b4ba068585387dd8b6975779",
Comment thread
greptile-apps[bot] marked this conversation as resolved.
"static/images/blog/announcing-git-deployment-triggers/cover.png": "1de5b1715230da3858017c845decdf24f1d30270d851e0412a5b1bbd43fb8009",
"static/images/blog/announcing-image-transformations-pricing/cover.png": "dfdd070a46b5f8c66d7b4781cc3dc61faa10c80307882e206be0ff7d46ca77db",
"static/images/blog/announcing-image-transformations-pricing/usage-component.png": "e24a8b710ea5de5ee2fe7c2c4507f54dccb3530a602027fc7a4265d5fc7b6eca",
"static/images/blog/announcing-init-faster-smoother-better/init-cover.png": "bdb97596d618cfe366d946c49d7791e9bb37062b2033fa7ee6d21329ced5e58a",
Expand Down
10 changes: 10 additions & 0 deletions src/partials/git-glob-patterns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
| Pattern | What it does | Example | Matches |
| ------- | ----------------------------------------- | ---------------- | ----------------------------------- |
| `main` | Matches exact text | `main` | `main` |
| `*` | Matches within one path segment | `release/*` | `release/1.0` |
| `**` | Matches across nested path segments | `preview/**` | `preview/test`, `preview/team/test` |
| `?` | Matches one character in one path segment | `v?.?` | `v1.0`, `v2.5` |
| `[abc]` | Matches one character from a set | `[Mm]ain` | `main`, `Main` |
| `[a-z]` | Matches one character in a range | `release/[0-9]*` | `release/1.0` |
| `\` | Escapes a special character | `file\?.txt` | `file?.txt` |
| `!` | Excludes matching branches or paths | `!docs/**` | Excludes changes under `docs/` |
11 changes: 11 additions & 0 deletions src/routes/blog/author/harsh-mahajan/+page.markdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
layout: author
slug: harsh-mahajan
name: Harsh Mahajan
role: Product Engineer
bio: I build things on the internet and pretend bugs are edge cases.
avatar: /images/avatars/harsh.avif
twitter: https://x.com/BlackX75676455
github: https://github.com/HarshMN2345
linkedin: https://www.linkedin.com/in/mahajan-harsh
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
layout: post
title: "Announcing Git deployment triggers for Appwrite Functions and Sites"
description: Git deployment triggers let you control which branches and file changes create automatic deployments for Appwrite Functions and Sites.
date: 2026-05-29
cover: /images/blog/announcing-git-deployment-triggers/cover.avif
Comment thread
greptile-apps[bot] marked this conversation as resolved.
timeToRead: 4
author: harsh-mahajan
category: announcement
featured: false
callToAction: true
faqs:
- question: "What are Git deployment triggers in Appwrite?"
answer: "Git deployment triggers let you control which branch pushes and file changes create automatic deployments for Appwrite Functions and Sites."
- question: "Are Git deployment triggers only for preview deployments?"
answer: "No. Git deployment triggers apply to automatic Git deployments for Functions and Sites. They can be used for production branches, staging branches, preview branches, and monorepo workflows."
- question: "What do branch filters do?"
answer: "Branch filters match Git branch names. Add patterns like `main`, `staging`, or `preview/**` to create deployments only from matching branches."
- question: "What do path filters do?"
answer: "Path filters match files changed in a commit or pull request. Leave the field empty to create deployments for all file changes, or add patterns like `apps/web/**` or `functions/api/**` to deploy only when matching files change."
- question: "Can I exclude branches or paths?"
answer: "Yes. Prefix a pattern with `!` to exclude matching branches or paths, such as `!docs/**` for documentation-only changes."
---

Git-based deployments make it easy to connect a repository and let Appwrite build from your pushes. That works well for small projects, but many teams quickly move into workflows with staging branches, preview branches, shared packages, and monorepos where a single repository powers several Functions and Sites.

In those setups, not every Git change should create every deployment. A docs-only change should not rebuild a production Site. A backend package change may need to rebuild an API Function, but not a marketing page. A team might want previews from the `preview/**` branch pattern, while keeping release deploys limited to `main`.

Today, we are announcing **Git deployment triggers for Appwrite Functions and Sites**.

Git deployment triggers let you control which branches and file changes create automatic deployments.

# What Git deployment triggers give you

- **Control over automatic deployments:** Choose the branch pushes and file changes that should start a build.
- **Cleaner preview workflows:** Create deployments from the branches your team uses for previews, staging, testing, or release candidates.
- **Better monorepo support:** Deploy a Function or Site only when files in the relevant folders change.
- **Simple glob patterns:** Use familiar patterns like `main`, `preview/**`, `apps/web/**`, and `!docs/**`. See the [build trigger docs](/docs/products/sites/deploy-from-git#build-triggers) for supported glob pattern formats.
- **Support for Functions and Sites:** Configure the same behavior across both Appwrite compute products.

# Branch filters

**Branch filters** match branch names. Add patterns to limit automatic deployments to specific branches.

| Pattern | Matches | Example use |
| --- | --- | --- |
| `main` | The `main` branch | Deploy from your production branch |
| `staging` | The `staging` branch | Deploy from a staging branch |
| `preview/**` | Branches nested under `preview/` | Deploy from branches like `preview/new-checkout` |

Branch filters work alongside your production branch setting. The production branch still controls which deployment becomes active for the Function or Site. Matching non-production branches can still create deployments for preview and testing workflows.

# Path filters

**Path filters** match files changed in a commit or pull request. Leave this field empty to create deployments for all file changes, or add patterns to deploy only when specific files change.

| Pattern | Matches | Example use |
| --- | --- | --- |
| `apps/web/**` | Files nested under `apps/web/` | Deploy a Site when its app files change |
| `packages/ui/**` | Files nested under `packages/ui/` | Deploy when shared UI components change |
| `!docs/**` | Excludes files nested under `docs/` | Skip docs-only changes |

Path filters are especially useful in monorepos. If one repository contains a web app, background Functions, shared packages, and docs, each Appwrite resource can listen only to the files it actually needs.

# How to configure build triggers

In the Appwrite Console, open the Function or Site you want to configure, then go to its Git settings and update **Build triggers**.

![Build triggers settings in the Appwrite Console](/images/blog/announcing-git-deployment-triggers/build-triggers.avif)

- **Sites:** Go to **Sites** > your site > **Settings** > **Git repository**.
- **Functions:** Go to **Functions** > your function > **Settings** > **Configuration** > **Git settings**.

You can also configure the same behavior through the API and Server SDKs using `providerBranches` for branch filters and `providerPaths` for path filters.

# Get started with Git deployment triggers

Git deployment triggers help keep automatic deployments aligned with how your team ships. They reduce unnecessary builds, make monorepos easier to manage, and give each Function or Site a clearer connection to the branches and files that matter.

- [Configure build triggers for Sites](/docs/products/sites/deploy-from-git#build-triggers)
- [Configure build triggers for Functions](/docs/products/functions/deploy-from-git#build-triggers)
27 changes: 27 additions & 0 deletions src/routes/changelog/(entries)/2026-05-29.markdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
layout: changelog
title: "Control automatic Git deployments with build triggers"
date: 2026-05-29
cover: /images/blog/announcing-git-deployment-triggers/cover.avif
---

Appwrite now supports **Git deployment triggers** for Functions and Sites. Use **branch filters** and **path filters** to control which Git pushes and pull requests create automatic deployments.

- **Branch filters** match branch names, such as `main`, `staging`, or `preview/**`.
- **Path filters** match changed files, such as `apps/web/**`, `functions/api/**`, or `packages/shared/**`.

You can prefix a pattern with `!` to exclude matching branches or paths.

This is especially useful for monorepos, staging branches, preview workflows, and projects where a change to one folder should not rebuild every connected Function or Site.

{% arrow_link href="/blog/post/announcing-git-deployment-triggers" %}
Read the announcement
{% /arrow_link %}

{% arrow_link href="/docs/products/sites/deploy-from-git#build-triggers" %}
Build triggers for Sites
{% /arrow_link %}

{% arrow_link href="/docs/products/functions/deploy-from-git#build-triggers" %}
Build triggers for Functions
{% /arrow_link %}
26 changes: 25 additions & 1 deletion src/routes/docs/products/functions/deploy-from-git/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,30 @@ This means, the new deployment will not handle any incoming requests until it is
If you need to update your Git configuration, navigate to **Functions** > your function >
**Settings** > **Configuration** > **Git settings**.

## Build triggers {% #build-triggers %}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add screenshots in both Functions and Sites

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be almost the same thing, I think it will be redundant


Build triggers control which Git changes create automatic deployments. You can configure branch filters and path filters with glob patterns.

**Branch filters** match branch names. Add patterns to limit automatic deployments to specific branches.

```txt
main
staging
preview/**
```

**Path filters** match files changed in a commit or pull request. Leave this field empty to create deployments for all file changes, or add patterns to deploy only when specific files change.

```txt
functions/api/**
packages/shared/**
!docs/**
```

Use these formats to write glob patterns.

{% partial file="git-glob-patterns.md" /%}

## Entry point {% #entry-point %}
The entry point is the code file contains the exported function that will be executed when the function is called.
This entry point has a specific format that must be followed. You can find examples using a [starter template](/docs/products/functions/templates)
Expand Down Expand Up @@ -66,4 +90,4 @@ These commands will be ran before the function is built and can be used to insta

- If you're missing some code files at build time, make sure they are included in the Git configuration's **Root directory**. Only files in the root directory folder will be copied to the executor.

- If you're self-hosting Appwrite, you will need to configure some [environment variables](/docs/advanced/self-hosting/functions) to enable Git deployments.
- If you're self-hosting Appwrite, you will need to configure some [environment variables](/docs/advanced/self-hosting/functions) to enable Git deployments.
26 changes: 25 additions & 1 deletion src/routes/docs/products/sites/deploy-from-git/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,30 @@ When you push a commit to a branch other than the production branch, a new deplo

If you need to update your Git configuration, navigate to **Sites** > your site > **Settings** > **Git repository**.

## Build triggers {% #build-triggers %}

Build triggers control which Git changes create automatic deployments. You can configure branch filters and path filters with glob patterns.

**Branch filters** match branch names. Add patterns to limit automatic deployments to specific branches.

```txt
main
staging
preview/**
```

**Path filters** match files changed in a commit or pull request. Leave this field empty to create deployments for all file changes, or add patterns to deploy only when specific files change.

```txt
apps/web/**
packages/ui/**
!docs/**
```

Use these formats to write glob patterns.

{% partial file="git-glob-patterns.md" /%}

## Install command

The install command of your site allow you to install your site’s dependencies. You can specify custom install scripts such as ones that let you configure your `npm` command with options or use an alternative package manager such as `pnpm` or `yarn`.
Expand All @@ -54,4 +78,4 @@ The output directory will contain the files generated by your site's build comma

- If you updated your site's configuration but the deployment is not working as expected, you may need to first redeploy your site before the changes take effect.
- If you're missing some code files at build time, verify your **build command** and ensure that the build output is included in the Git configuration's **output directory**. Only files in the output directory folder will be available after deployment.
- If you're self-hosting Appwrite, you will need to configure some [environment variables](https://appwrite.io/docs/advanced/self-hosting/functions) to enable Git deployments.
- If you're self-hosting Appwrite, you will need to configure some [environment variables](https://appwrite.io/docs/advanced/self-hosting/functions) to enable Git deployments.
Binary file added static/images/avatars/harsh.avif
Binary file not shown.
Binary file not shown.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it not make more sense to have the Git logo here?

Binary file not shown.
Loading