Integrate with GitHub

Encore applications are easy to integrate with GitHub for source code hosting. To link your application to GitHub, open Your app, then head to App Settings Git integration and follow the instructions.

For a more detailed guide on linking with GitHub, see the Setup Walkthrough below.

Pull Requests & Preview Environments

Once you've linked with GitHub, Encore will automatically start building and running tests against your Pull Requests.

Encore will also provision a dedicated Preview Environment for each pull request. This environment works just like a regular development environment, and lets you test your changes before merging.

Preview Environments are named after the pull request, so PR #72 will create an environment named pr:72.

Frontend Collaboration

When you integrate Encore with a frontend, Preview Environments makes it really easy to collaborate and test your changes against the frontend. Just update your frontend API client to point to the pr:# environment. This should just be a one-line change since your API client always specifies the environment name like https://<env>-<my-app>

If your pull request makes changes to the API, you can also easily generate an API client against the new backend API using encore gen client --env=pr:72 --lang=typescript my-app

Setup Walkthrough

Open your application on, and click the app id in the top left. Select App Settings and then navigate to Git Integration.

First link your account with GitHub. Grant access either to all repositories or only the one(s) you want to link with Encore.

When you come back to Encore, click the Link app to GitHub repository button:

In the popup, select the repository you would like to link:

Click Link and you're done: