Git deployments
Deploy every push, preview branches and pull requests, and control which commits build.
Connect a Git repository and Easel creates a deployment for every push. Pushes to the production branch create Production deployments, and pushes to any other branch create Preview deployments. See Preview and Production.
Branch previews
Each push to a non-production branch creates a Preview deployment with its own unique URL. The branch also gets a stable branch URL that moves to the latest Ready deployment on that branch.
The branch URL moves only when a new deployment reaches Ready. While a new commit builds, or if its build fails or is canceled, the branch URL keeps serving the last Ready deployment. Older deployments stay reachable on their unique URLs. See Deployment URLs for hostname formats.
Pull request previews
Opening or updating a pull request doesn't create a deployment by itself. A push to the pull request's head branch does, and when that branch has an open pull request, Easel also gives the deployment a pull request URL. Branch and pull request URLs are separate hostnames that can point at the same deployment.
Easel reports build status and preview URLs back to GitHub. Choose what it writes in Project settings → Git: Pull request comments, Commit statuses, Commit comments, and Deployment events for Actions that wait on a deploy.
Each project reports under its own name, so several projects deploying from
one repository show side by side on a commit. The commit status is
Easel – <project slug>, and deployment events use the
Preview – <project slug> and Production – <project slug> environments. To
make a project's deploy a required check in a branch protection rule, pick
Easel – <project slug>. Changing the project slug changes these names, so
update the rule after a rename.
Preview URLs are public unless you turn on
deployment protection. Preview
responses send X-Robots-Tag so search engines don't index them.
Merging a pull request
The Preview deployment stays a Preview deployment. When the merge commit lands on the production branch, Easel builds a new Production deployment from it with Production environment variables. It goes live when Ready if Promote production builds automatically is on, or stays Staged until you promote it. See Promote and roll back.
Production output can differ from the preview you tested, because the two environments can have different variables.
Closing or deleting a branch
Closing a pull request or deleting a branch doesn't delete its deployments. Unique URLs keep working while each deployment stays Ready, and the branch and pull request URLs stop updating. You can still inspect those deployments or promote one to production.
Skipping deployments
To stop pushes to some branches from deploying at all, list them in the
Preview field under Project settings → Git → Environments. Separate
patterns with commas. * matches any characters, so dependabot/*
ignores Dependabot branches, and * alone turns off automatic Preview
deployments. Pushes to the production branch always deploy.
Two settings in Project settings → Build stop a push from building:
- Skip unaffected deployments: on by default. When a push doesn't change the project's root directory or any workspace package it depends on, the deployment is marked Skipped. See Monorepos.
- Ignored build step: a command that runs after the clone. Exit code
0skips the build and the deployment shows as Canceled. Any other exit code builds.
Forks and untrusted code
Easel deploys pushes to the connected repository. There's no separate approval step that withholds variables from forked pull requests, so keep Production credentials out of Preview variables. See Forks and Preview variables.
To block unsigned commits, turn on Require verified commits in Project settings → Git.
Disconnecting Git
Disconnecting a repository stops automatic deployments. Existing deployments and their URLs keep working. If you connect a different repository, new deployments come from it, and older deployments keep the source they were built from.
Git provider permissions
Easel asks for access to read repository contents and commit metadata, receive push webhooks, find open pull requests, and write commit statuses and comments. If you remove a permission, the feature that needs it stops: without webhooks, pushes no longer create deployments.