# Deploys

What is live now, every build that came before it, the variables every build gets, and the site’s logs.

*Deploys: what answers now, then every build, newest first.*

## The first deploy

Until a site has been deployed, its Deploys screen is one button: **Deploy**. An owner or admin starts the first deploy. It builds the site’s branch and puts it live at the staging address.

## Production

The top of the screen is what visitors get now: the commit, who pushed it, how long it took to build and where it answers, with a window onto the live site.

## Deployments

Every deploy, newest first. Each says its state in one word:

| State | Means |
| --- | --- |
| **Live** | This deploy answers visitors now. |
| **Ready** | Built, and not the one live: an earlier production deploy, or a preview. |
| **Building** | Its build is running. |
| **Queued** | Waiting for its turn to build. |
| **Failed** | Its build did not finish. Nothing live changed. |
| **Canceled** | Stopped before it finished. |

Each row has its own actions:

- **View build log**: everything the build printed, for a build that failed or took too long.
- **View commit**: the commit on GitHub.
- **Build again**: rebuild the same commit.
- **Roll back to this**: put an earlier production deploy back live at once, without rebuilding it.
- **Preview it**: open a deploy that is not live at its own address.

## Preview deploys

A preview builds any branch at an address of its own and never goes live: use it to show a change before it ships. Agents can start one with `deploy_cloud_app` and `target: "preview"`.

## Environment variables

**Environment** holds the variables every build of the site gets: API keys, a feature flag, the address of something it calls. **Add variable**, give it a name and a value, and the next deploy reads it. A site whose code reads its CMS keeps its content key here as `STACKLUMEN_CONTENT_KEY`; **Add the content key** puts it in for you.

> **Tip:** A changed variable reaches visitors with the next deploy. Press **Deploy latest commit** to send it now.

## Logs

What the running site printed, newest first: the place to look when a page that built fine answers with an error.

## Build settings

**Build** shows the repository, branch and folder the site builds from, with the build command and output folder. Build settings are read from the repository, so a framework project needs no setup; change the repository, branch or folder here.

## Pause and resume

Pausing a site stops it answering, on its staging address and its domain, until you press **Resume**. Its status reads **Paused** everywhere meanwhile.
