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.
Image loading...Example pipeline with Heroku deployment and CLI commands
Create new Heroku app
- Once you register an account and add your credit card, click Create New App:
Image loading...Creating new app in Heroku
- A window will appear:
Image loading...New 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
- Create a new project in Buddy and select your Git provider:
Image loading...Creating new project
- Add a new pipeline and configure the details: name, trigger mode, and branch from which you want to deploy.
Image loading...Adding new pipeline
Configure Heroku deployment
- Look up and click Heroku or Heroku CLI on the action list to add it to the pipeline:
Image loading...Heroku actions
- 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
Image loading...Heroku 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).
- When ready, click Add this action to finish configuration.
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.
Image loading...Heroku CLI action configuration
đź“š Learn more about Heroku action features, integrations and alternatives.
Sep 24, 2024