Berth

Pull request previews

berth previews:on myapp

Now each open pull request into the app's branch gets its own app, myapp-pr-<number>, at https://myapp-pr-12.<your domain>. It's built from the PR's latest commit, redeployed on every push to it, and destroyed when the PR is merged or closed. A check on the PR links to it, and Berth leaves a comment the first time.

Previews work like dev versions. They start with the app's config, get their own empty databases (which the release command sets up), run workers but not scheduled jobs, sleep when idle, and sit behind the same access rule (@owners with sign-in, LAN only without), so dev tokens work on them too.

  • PRs from forks never get a preview. That would be running a stranger's code on your Mac.
  • At most 3 run at once (--max 5 to change it). A PR over the limit gets a check saying so.
  • They follow GitHub's pull request webhook, and check every 5 minutes for anything missed. They need a GitHub repo and Berth's GitHub login.
berth previews myapp       # the previews and how they're doing
berth previews:off myapp   # stop, and destroy the ones that exist

Edit this page on GitHub (it's a section of the README)