forest deploy
Deploy the layout changes of your current branch to the reference environment (typically Production). Unlike forest push, which targets non-production environments, forest deploy permanently applies your changes to production.
Usage
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.
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.
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:
$ 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:
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.
Deploy from the UI is only available for remote environments whose origin is the reference environment (Production).
Push vs. deploy
| Command | Target | Effect |
|---|
forest 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
# Deploy with confirmation prompt
forest deploy
# Deploy without confirmation
forest deploy --force
# Deploy in a specific project
forest deploy --projectId 42