Documentation Sign in to the Console

Pull request previews

Every pull request gets its own address, so you and your clients can check a change before it goes live.

How previews work

When a pull request is opened from a branch of the same repository, Sites builds it and serves it at:

text
https://<site>--pr-<number>.xksites.ca

For example, pull request 12 on the site goldenaura is at goldenaura--pr-12.xksites.ca.

  • A comment on the pull request links to the preview and is updated with each new push.
  • The pull request's check links to the preview or to the failed build's log.
  • The site's Deploys tab lists open previews with Open preview.
  • Closing or merging the pull request removes the preview.

What's different about a preview

Production Preview
Address Free address and your domains <site>--pr-<number>.xksites.ca only
Functions Run Run, separately from production
Forms Send email Don't send email
Search engines Indexed Told not to index (X-Robots-Tag: noindex)
Settings and secrets Yes Yes, the same values

Warning

Previews receive the same secrets as production and their addresses aren't secret. Don't open pull requests that print secrets into pages, and use separate test keys where you can.

Turn previews off

On the site's Deploys tab, choose Edit in the GitHub panel and clear Pull request previews. Open previews are removed when their pull requests close.