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

# Preview and publish

> Review the changes you and your agent have saved, then publish that version of the whole site.

Your hosted site has one shared preview. The web editor and your agent save to
the same Git branch. Every article in that branch is part of the preview,
along with the settings, layouts, and assets used to build it.

## Save changes

* In the web editor, create or edit a page. Lettercamp groups edits into autosaves
  and saves pending changes when you open **Preview**.
* In a [connected CLI workspace](https://www.lettercamp.com/docs/cli/connect.md), run `npx lettercamp pull` to get
  the latest saved files. Edit locally and run `npx lettercamp push`. The
  `posts create` and `posts update` commands save directly to the same branch.
* For a site connected to [your own GitHub repository](https://www.lettercamp.com/docs/git.md), push to the
  preview branch shown in the site's agent instructions.

## Review the build

Open **Preview** in Lettercamp to see the site built from those files. For
example, after adding an article, check its card on the homepage and open it
to read the full page. While a newer build is running, wait for it to finish
before publishing. If it fails, check **Activity**, fix the source, and review
the next successful build.

## Make the preview live

Click **Publish** to promote the build you reviewed. All changes in it go live
together, including new articles, edits, and deletions. A publishing-enabled
agent can promote that same build with
[`npx lettercamp publish --preview <id>`](https://www.lettercamp.com/docs/cli/connect#publish-the-site-preview).

To publish directly from a local folder, use [CLI deploy](https://www.lettercamp.com/docs/publishing/deploy.md).
Its first deployment creates a hosted site with this same preview workflow.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.