Phemeral
Guides

Set Up GitHub Continuous Deployment

Connect a repository and map branches to environments for automatic deployments on push.

This guide covers how to set up continuous deployment so that pushing to a GitHub branch automatically deploys your code to a Phemeral environment.

Prerequisites

Connect a Repository to Your Project

  1. Open your project in the dashboard.
  2. Go to the Settings tab.
  3. In the GitHub Repository section, select the repository from the dropdown.

The dropdown lists all repositories that Phemeral has access to across your GitHub account and any of your GitHub organizations where Phemeral has been connected.

A project can be connected to one repository at a time.

Map a Branch to an Environment

After connecting a repository:

  1. On the Settings tab, find the Branch Mappings section.
  2. Select a branch from the repository.
  3. Select the environment you want that branch to deploy to.
  4. Save the mapping.

You can map multiple branches to different environments within the same project. For example:

BranchEnvironment
mainProduction
pre-releaseStaging
fancy-feature-branchDevelopment

Each branch can be mapped to one environment. Each environment can have one branch mapped to it.

Remove a Branch Mapping

To stop automatic deployments for a branch:

  1. Go to the project's Settings tab.
  2. Find the branch mapping you want to remove.
  3. Delete the mapping.

Existing deployments are not affected. The environment retains its current deployment.

Disconnect a Repository

To remove the repository connection entirely:

  1. Go to the project's Settings tab.
  2. Click Disconnect in the GitHub Repository section.

This removes all branch-to-environment mappings for the project. Existing deployments and environments are not affected, but no new automatic deployments will be triggered until a repository is reconnected.