> ## Documentation Index
> Fetch the complete documentation index at: https://forest-chore-open-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# forest deploy

> Deploy layout changes from your current branch to the production (reference) environment

# forest deploy

Deploy the layout changes of your current branch to the reference environment (typically Production). Unlike [`forest push`](/reference/cli/push), which targets non-production environments, `forest deploy` permanently applies your changes to production.

## Usage

```bash theme={null}
forest deploy [options]
```

## Options

| Option            | Description                     |
| ----------------- | ------------------------------- |
| `-f, --force`     | Skip deployment confirmation    |
| `-p, --projectId` | The ID of the project to deploy |
| `--help`          | Display usage information       |

## How it works

When you run `forest deploy`, your branch's layout changes (Δ) are permanently applied to your Production Environment:

```
my-branch (Δ) ──deploy──► Production (reference)
```

Since remote environments have Production as their origin, the deployed changes will automatically appear in all remote environments too.

<Warning>
  Deploying to production is **irreversible**. The layout changes will be permanently applied to your Production Environment. Make sure changes have been tested in a staging or remote environment first.
</Warning>

## Prerequisites

To deploy a branch, its **origin must be the reference environment** (Production). If you created your branch from a staging environment, you cannot deploy it directly, you would need to push it to staging first, then deploy from there.

## Deploying changes

Run `forest deploy` from your project directory:

```bash theme={null}
$ forest deploy
? Deploy my-current-branch to Production (Y|n): Y
✅ Deployment successful.
```

You will be prompted to confirm the deployment. To skip the confirmation:

```bash theme={null}
forest deploy --force
```

## Deploy from the UI

You can also deploy layout changes directly from the Forest UI. When a remote environment has changes ready to deploy to production, a banner appears at the top with a **"Deploy to …"** link.

<Info>
  Deploy from the UI is only available for remote environments whose origin **is** the reference environment (Production).
</Info>

## Push vs. deploy

| Command                              | Target                                    | Effect                                           |
| ------------------------------------ | ----------------------------------------- | ------------------------------------------------ |
| [`forest push`](/reference/cli/push) | Non-reference environments (e.g. staging) | Applies layout changes to a remote environment   |
| `forest deploy`                      | Reference environment (Production)        | Permanently applies layout changes to production |

## Examples

```bash theme={null}
# Deploy with confirmation prompt
forest deploy

# Deploy without confirmation
forest deploy --force

# Deploy in a specific project
forest deploy --projectId 42
```
