-
Notifications
You must be signed in to change notification settings - Fork 327
Add Git deployment triggers docs #3027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6290c6e
ca30439
0b49c65
ce57a4f
a2ea784
e629ad6
aa583ef
8a90aad
5614b63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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/` | |
| 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 | ||
|
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**. | ||
|
|
||
|  | ||
|
|
||
| - **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) | ||
| 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 %} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 %} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add screenshots in both Functions and Sites
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
|
|
@@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would it not make more sense to have the Git logo here? |
Uh oh!
There was an error while loading. Please reload this page.