Skip to content
Hoist

Preview deploys

Every pull request gets its own deployment, so you can try a change before it's merged. Previews are part of the Pro and Team plans.

How it works

When a pull request opens, or gets new commits, Hoist:

  1. deploys it at its own address, {project}-pr-{number}
  2. creates a fresh database for it, if one is attached for previews, and runs your migrations and an optional seed command
  3. shows the deployment status on GitHub, and keeps one comment on the pull request up to date

When the pull request is closed or merged, the preview, its database and its images are removed. Previews nobody has pushed to for a while are removed too.

Setting it up

Under a project's Settings → Previews:

  • turn previews on
  • choose a server for them. A separate server keeps previews from using the app’s resources
  • optionally, set a seed command such as php artisan db:seed --force

Previews use the Preview environment variables, so they never get the project’s own secrets unless you add them there too.

Pull requests from forks

Previews of pull requests from forks only run after a team member authorizes them, because they run code from outside your team.