---
title: "ezgh deploy apply"
description: "Deploy an environment's branch now."
---

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

# ezgh deploy apply

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh deploy apply [--ref r | --sha s] [--wait] [flags]
```

Deploy the environment's branch now: its head, or `--sha`, a commit on it. Prints the deployment's ID. `--wait` follows it, printing each status, until it ends or awaits approval; it exits 1 unless the deployment succeeded or awaits approval. A wait that times out or can't read the deployment ends; the deployment carries on.

Part of [`ezgh deploy`](/cli/reference/deploy).

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--ref` | string |  | the environment's branch, as a name or refs/heads/… |
| `--sha` | string |  | a commit on the environment's branch (default: its head) |
| `--timeout` | duration | `30m0s` | how long `--wait` waits |
| `--wait` | boolean |  | follow the deployment until it ends or awaits approval |

Inherited from parent commands:

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--dir` | string | `.` | the repository's checkout (any directory inside it) |
| `--json` | boolean |  | print JSON, as -o json does |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/deploy-apply/index.mdx
