> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tappify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Git deployments

> Build or upload an app whenever a customer pushes to GitHub.

A connected GitHub repository can start a Tappify build on every push. The Production branch uses the Production environment; every other branch uses Preview. New environments default to **Upload**, and each environment can instead use **Build** or **Off** in Build Settings.

## Add `tappify.json`

The dashboard is the upper limit on what a push can do. A `tappify.json` file at the repository root can turn a deployment off or reduce Upload to Build, but it cannot enable or elevate a dashboard setting.

```json theme={null}
{
  "$schema": "https://docs.tappify.ai/schemas/tappify.json",
  "version": 1,
  "git": {
    "mode": "upload",
    "branches": [
      { "pattern": "docs/**", "mode": "off" },
      { "pattern": "feature/**", "mode": "build" }
    ]
  },
  "build": {
    "appPath": "ios",
    "installCommand": "npm ci",
    "buildCommand": "npm run build",
    "nodeVersion": "22"
  }
}
```

Branch rules are checked from top to bottom and the first match wins. Patterns support literal text, `*`, `**`, and `?`. Negation, braces, extglobs, absolute paths, backslashes, and `.` or `..` path segments are rejected.

## Choose a mode

| Mode | Result |
| - | - |
| `off` | Records a neutral GitHub check and does not allocate a machine. |
| `build` | Builds the exact pushed commit and keeps its artifact. |
| `upload` | Builds and uploads to the environment's store connection. It never attaches the build to a release. |

The effective mode is the least capable of the global Git switch, the environment's dashboard mode, the file's top-level mode, and its matching branch rule.

You can inspect or update the same policy from the CLI:

```bash theme={null}
tappify deployments git
tappify deployments git --production-branch main --production-mode upload --preview-mode upload
tappify deployments git --preview-mode build
tappify deployments git --enabled off
```

Turning Git deployments off keeps both environment modes saved, so turning it back on restores them.

## Separate environments

Production and Preview keep separate signing credentials and store connections. Build variables and secret files can be stored in **All**, **Production**, or **Preview**. All values are inherited; an environment value with the same name or path overrides the shared value.

Tappify masks saved values and recognized text from secret files in live logs. Keep secrets out of `tappify.json` and the repository.

## Follow a build

GitHub shows a check named `Tappify / <app> / Production` or `Tappify / <app> / Preview`. Open it to see the selected policy, exact commit, measured machine time, artifact or upload outcome, and the existing masked live log in Tappify.

An invalid or oversized file completes the check with **Action required** and does not start a build.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.