Recipe: PR Preview Builds
Get an isolated preview deployment for every pull request, automatically.
Every pull request against your docs (or annotated source) repo can get its own preview deployment — reviewers see the rendered result, not a wall of MDX diff.
With the GitHub App (recommended)
If you connected your repo via the Syntext GitHub App, this already works:
opened, new pushes, and reopened all trigger rebuilds)Nothing to configure.
Preview addresses always fit DNS limits. A preview is served at <branch>--<subdomain>.syntext.dev; when that first part would be longer than 63 characters, the branch part is shortened and ends in a short code, such as …-page-m-e202f7--testing-docs.syntext.dev. Shorter branches keep their exact address. Always use the URL stx deploy prints (or the build's deployUrl) rather than building the address yourself.
From CI (any provider)
Trigger a preview build explicitly with the API or CLI:
The CLI uploads your working copy; the API builds a Git-connected project from the branch in its repository. A build of any branch other than the project's production branch is a preview.
Getting the Preview URL into the PR
stx deploy waits for the build, so its --json output already carries the URL:
After an API trigger, poll Get Build until status is deployed and read deployUrl.
Preview builds count toward your monthly build quota. They're isolated from production: search on a preview uses that preview's own index and never changes production's, and the AI assistant always answers from the production build. See Production and preview builds.