Guides
Preview environments
Every branch can get its own copy of a project at its own URL, with its own certificate, so you can click through a change before it reaches production.
Turn them on
- 1
Connect GitHub
Install the Skiff GitHub App from Settings → Connections and give it the repositories you deploy from. - 2
Enable previews on the project
In the project's Settings, switch on Preview deployments. - 3
Push a branch
A push to any branch other than the production one builds a preview at<project>-<branch>.<your domain>. Later pushes to that branch redeploy it.
You can also create one by hand from the project's Previews tab for any branch.
On your pull requests
- A comment with the link.Skiff posts the preview URL on the branch's pull request, whether the pull request is opened before or after the preview is built, and keeps that one comment up to date on every push.
- A status next to your checks. Every deploy reports on its commit as
Skiff / <project>(or… preview): building, then live with a link to the app, or failed with a link to the build log. It works for production deploys too.
Only what the branch changed
If a repository holds several projects, each in its own root directory, a branch only gets previews for the projects whose directory it touched. A branch that only changes the API doesn't build a preview of the website.
Keep previews away from production data
Previews use the project's environment variables, read fresh on every deploy. Anything under Environment → Preview overrides replaces a variable of the same name for previews only. Point DATABASE_URL at a staging database there, or switch an API key to test mode, and a preview never touches what production uses.
Password protection
On the Previews tab, set a password and every preview of the project asks for it before showing anything. Your production URL stays public. A visitor stays signed in to a preview for a week; changing the password signs everyone out. Repeated wrong guesses from one address are blocked for a few minutes.
Cleaning up
Deleting a branch removes its previews: containers, images and routes. If your repository deletes branches when a pull request merges, previews take care of themselves. You can also remove one from the Previews tab at any time.