Deploying Applications with Encore

Encore comes with built-in CI/CD and integrates with GitHub

Encore simplifies the deployment process, making it as straightforward as a git push. Encore's built-in integration with Git and GitHub, automated CI/CD pipeline, and automatic provisioning of Preview Environments and cloud infrastructure, is designed to speed up development and remove manual steps.

Setting Up Your Encore Application

  1. Create your Application: If you haven't already, create an application using the Encore CLI. This automatically creates a new git repository managed by Encore.
$ encore app create
  1. Integrate with GitHub (Optional): If you prefer to use GitHub, you can integrate your app with GitHub. This way, you can push code to GitHub, which triggers Encore's deployment process. This is especially handy for teams as it enables collaborative development, version control, and other GitHub functionality.

Deploying Your Application

With Encore, deploys are triggered simply by pushing changes to the connected Git repository.

  • If you are using Encore's Git, run the following command to deploy your application:
$ git push encore
  • If you are using GitHub, a standard git push to your repository will work:
$ git push origin

In both scenarios, this will trigger Encore's built-in CI/CD pipeline. This includes building your application, running tests, provisioning the necessary infrastructure, and deploying your application.

Configure deploy trigger

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.

Preview Environments

When you connect your GitHub account and push changes to a pull request, Encore will automatically create a Preview Environment. This is a fully functional, isolated environment where you can test your application as it would run in production. This environment runs in Encore's free development cloud, giving you an efficient way to validate your changes before they are merged and deployed to the primary environment.