Requirements
There’s nothing to switch on. Once these are true, opening a pull request against the project’s repository creates a preview.
How it works
1
Open a pull request
Open a pull request against the branch your project deploys, such as
main.2
Pxxl builds it
Pxxl builds the pull request’s latest commit through the same pipeline as production, starting from the production branch’s build cache.
3
Get the URL
The preview goes live at its own random address. On GitHub, the pull request shows the deployment and a Pxxl commit status, with a link to the preview.
4
Push more commits
Each new commit on the pull request redeploys the same preview, at the same URL.
5
Merge or close
When the pull request is merged or closed, Pxxl stops the preview, removes its URL and deletes its build cache. A merge then deploys to production like any push.
Promote a preview to production
When a preview looks right, ship exactly what you checked. Promote to production on the preview’s card merges its pull request on GitHub, at the commit the preview was built from. That merge is a push to your production branch, so production then deploys it like any other push: through Wait for CI, the pre-deploy command and your health check. Pxxl doesn’t deploy anything itself when you promote.
1
Open the project's Overview
Each open pull request has a card with its title, branch and preview URL.
2
Choose Promote to production
The panel names the pull request and the branch it merges into.
3
Pick how to merge
Squash and merge, Create a merge commit or Rebase and merge: the methods your repository allows on GitHub. Squash is the default when it’s allowed.
4
Merge and deploy
Choose Merge #N and deploy. The pull request is merged as Pxxl’s GitHub App and the preview closes. Follow the production deployment in the Deployments tab.

When you can’t promote
The button stays off and says why. Fix it on GitHub, then come back:
Turn previews on or off
Previews follow Settings > Deployments > Auto-deploy: when a project deploys on push, its pull requests get previews. Turn Auto-deploy off and neither pushes nor pull requests deploy. A preview starts when a pull request is opened, reopened, marked ready for review, or gets a new commit.Variables in previews
A preview doesn’t get your production variables by default. A pull request can come from anyone who can push to the repository, and you don’t want its code to reach your production database or payment keys. Instead, previews get the project’s preview variables. Add them in the Secrets tab under Preview Variables, with test values such as a stagingDATABASE_URL or a test API key.

Pull requests from forks
A pull request from a fork, by someone who isn’t an owner, member or collaborator on the repository, isn’t built straight away. It waits for your approval, and you get a notification: PR #N preview needs your approval. In the project’s Overview, the preview shows needs approval. Read the change, then choose Approve and build. Every new commit on a fork’s pull request needs approval again. That way, nobody outside your team can run code on your account or read your preview variables without you looking first.Protect previews
To keep previews private, turn on password protection in Settings > Protection and choose Preview only. Visitors to a preview then need the password, while production stays public. Plus and up.Limits
- 5 open previews per project. A sixth pull request’s preview is held with preview limit. Close a preview or merge a pull request, then choose Try again on the held one.
- Idle previews close after 30 days. A preview with no new commits for 30 days is stopped.
- Preview builds use your plan’s build minutes, like any build.
- Previews are for GitHub projects. GitLab, Pxxl Drop, Docker and CLI projects don’t get them.
If a preview doesn’t appear
No preview for my pull request
No preview for my pull request
Check that the project is on a paid plan, deploys from GitHub, and has Auto-deploy on. Check that the project doesn’t already have 5 open previews.
The preview waits for approval
The preview waits for approval
The pull request comes from outside your team. Choose Approve and build on its card.
The preview can't reach the database
The preview can't reach the database
Previews use preview variables by default. Add the variables it needs on the Secrets tab, or turn on Sync PR previews with project variables.
Previews from the CLI
Without GitHub, you can get a similar flow by deploying a branch to a second project:pxxl env push, and promote by deploying the same code to your main project.
