Deploy to Heroku

How to deploy to Heroku?

Deploying to Heroku with Buddy is a straightforward process that requires creating a new Heroku app and configuring a pipeline with deployment action.

The automation of Heroku deployment speeds up the application update process and ensures efficiency and reliability, regardless of whether you decide to deploy on every push to the git repository, manually or recurrently.

Example pipeline with Heroku deployment and CLI commandsExample pipeline with Heroku deployment and CLI commands

Tip
If you are new to Buddy, check out our quickstart guides that will tell you how to create build, test and deploy your type of application.

Create new Heroku app

  1. Once you register an account and add your credit card, click Create New App:

Creating new app in HerokuCreating new app in Heroku

  1. A window will appear:

New Heroku app configurationNew Heroku app configuration

Here you need to provide:

  • App name
  • Region (United States or Europe)

If you configured everything correctly, a space in Heroku was created. You can go back to Buddy now and set up an integration with Heroku:

Configure pipeline in Buddy

  1. Create a new project in Buddy and select your Git provider:

Creating new projectCreating new project

  1. Add a new pipeline and configure the details: name, trigger mode, and branch from which you want to deploy.

Adding new pipelineAdding new pipeline

Configure Heroku deployment

  1. Look up and click Heroku or Heroku CLI on the action list to add it to the pipeline:

Heroku actionsHeroku actions

  1. The action uses git push to upload files and has four configuration tabs:
  • Push – here you select the Heroku integration, define the files to ignore, and set additional Git options
  • Variables – here you can add and modify environment variables required by your workflow
  • Conditions – here you configure the trigger conditions for which the action will run
  • Options – here you define the action's name and behavior on failure and timeout

Heroku action configurationHeroku action configuration

By adding patterns for files and dirs to the .gitignore section, you may exclude unneeded files from being deployed (file ignore in the Heroku action is handled via .gitignore file).

  1. When ready, click Add this action to finish configuration.
Success
Congratulations! You have just automated deployments to your Heroku platform. 🥳

Heroku CLI

Heroku Command Line Interface (CLI) is a tool for managing and deploying applications on the Heroku platform. It allows you to create, manage and scale applications, run one-off dynos and perform database migrations.

With Heroku CLI action in Buddy, you can run any method from the Heroku API. Once triggered, it launches a container with the Heroku CLI installed and executes commands in the context of the selected application – just like you'd do it in your system terminal.

Heroku CLI action configurationHeroku CLI action configuration

Tip
Hint

đź“š Learn more about Heroku action features, integrations and alternatives.

Last update:
Sep 20, 2024