# Test changes in a preview

Create a disposable copy of an Environment, test a revision, and remove it afterward.

Canonical: https://docs.deliberate.space/deploy/environments/

Check a change against a complete copy of production before applying it to
production itself:

```sh
deliberate diff --env production
deliberate apply --env production
```

Repeating the same apply is safe. Each apply reconciles the Environment to one
complete Project revision.

## Create a preview

A Flow describes which persistent Environments exist and which disposable
Environment names can be created from them. The bundled default provides a
production Environment and a `preview-*` family derived from it. Teams on plans
that permit custom Flows may change this topology; otherwise the current Flow
remains usable but locked.

Applying to a missing matching name creates the preview and reconciles the
complete local desired state onto it:

```sh
deliberate apply --env preview-new-checkout
deliberate open --env preview-new-checkout
```

After testing, apply the accepted desired state explicitly to production and
remove the preview:

```sh
deliberate apply --env production
deliberate envs delete preview-new-checkout
```

## Find the deployed application

After apply, the CLI and console report whether Components became ready and show
the relevant public or Private Net routes. A Blueprint's optional onboarding
link is a first-deploy UX nudge, not hidden lifecycle state.

Generated platform hostnames are stable for their resource identity. Use your
own domain for a customer-facing production address.

## Next steps

- [Automate previews with GitHub Actions](/deploy/github-actions/)
- [Attach a custom domain](/deploy/custom-domains/)
- [Troubleshoot a failed revision](/operate/observe-and-recover/)
