Deploy
Put the site on a host, set its environment variables, and point Live Preview at it.
An ACES site is a standard Next.js 16 app, so any Next.js host works: Vercel, Netlify, or a Node server running pnpm build && pnpm start.
1. Set the environment variables
Copy these from .env.local into the host’s settings:
| Variable | Notes |
|---|---|
NEXT_PUBLIC_CF_GRAPHQL_URL |
Usually https://graphql.contentful.com/content/v1/spaces |
NEXT_PUBLIC_CF_SPACE |
Space ID |
NEXT_PUBLIC_CF_ENVIRONMENT |
For example master |
NEXT_PUBLIC_CF_ACCESS_TOKEN |
Delivery API token |
NEXT_PUBLIC_CF_PREVIEW_ACCESS_TOKEN |
Preview API token |
CF_PREVIEW_SECRET |
Server only. Must match the secret in your Live Preview URLs. |
2. Tell ACES where the site lives
Set the public URL in aces.config.ts:
site: { name: "Northwind", appId: "northwind", url: "https://www.northwind.com" },
Metadata and share links use it. Without it they fall back to the request host.
3. Point Live Preview at the deployed site
The preview URLs that aces setup created point at http://localhost:3000. Rebuild them for the deployed site:
pnpm aces previews # uses site.url
pnpm aces previews --site-url https://staging.northwind.com # or any URL
Editors now see the deployed site in the Live Preview pane. next.config.ts already allows app.contentful.com to frame the site.
4. Check before you ship
pnpm aces sync --check # config and code agree (good as a CI step)
pnpm typecheck && pnpm lint && pnpm build
pnpm aces doctor # env, tokens, the Apps entry, content types
Keeping content fresh
Pages are rendered by Next.js and cached by your host. To show published changes without a redeploy, add a Contentful webhook that calls the site’s revalidate route on publish, with the changed path:
https://www.northwind.com/api/revalidate?pathname=/about
Several environments
Use one Contentful environment per site environment (for example staging and master). Set NEXT_PUBLIC_CF_ENVIRONMENT per deployment, and run aces previews --site-url … once for each.
Something wrong or missing? Open an issue.