Encore applications are easy to integrate with GitHub for source code hosting.
To link your application to GitHub, open your application on app.encore.dev, and click on Settings in the main navigation. Then select GitHub in the settings menu.
Next, connect your account to GitHub by clicking the Connect Account to GitHub button. This will open GitHub where you can grant access either to all repositories or only the specific one(s) you want to link with Encore.
When you come back to Encore, click the Link App to GitHub button:
In the popup, select the repository you would like to link your app with:
Click Link and you're done! Encore will now automatically start building and running tests against your Pull Requests, and provision Preview Environments for each Pull Request.
When using GitHub, you can configure Encore to automatically trigger deploys when you push to a specific branch name.
To configure which branch name is used to trigger deploys, open your app in the Cloud Dashboard and go to the Overview page for your intended environment. Click on Settings and then in the section Branch Push configure the
Branch name and hit save.
Once you've linked your app 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.
Learn more in the Preview Environments documentation.