Preview pull requests
Give every pull request its own running copy.
1Turn previews on
On the repository’s Settings tab, turn on pull-request previews. Each new pull request gets its own website and environment.
2Share it
GitHub App repositories get a check run and a comment with the preview’s address.
3Secrets
Previews start without secrets; approve the ones a preview needs for its exact revision.
4Start with data
On the repository’s Settings tab, choose a website to copy the database from, and each preview starts with a copy of it: everything, a quick branch with the first 1,000 rows of each table (best for big databases), or the schema only for your seeders to fill. Tick Mask personal data to replace emails, names, phone numbers, addresses, IP addresses and dates of birth in each copy.
5Clean-up
A preview is removed when its pull request is closed or merged.
6Any branch
On Deploy → Previews, use Preview a branch to open one for any branch, not only a pull request, and choose when it closes (1 to 30 days). It deploys the branch’s latest commit; open it again to deploy newer commits or move the date.