Skip to main content

Deploy to Heroku

This page explains how to deploy applications to Heroku using FluentCI.

Before you begin

The instructions on this page assume that you are familiar with Heroku. In addition:

  • Have your Heroku project ready.
  • Have a Procfile in your project root directory.
  • If you don't already have a project to deploy to Heroku, you can create a default project by installing and initializing Heroku.

Using the Heroku Plugin

You can use FluentCI to deploy applications to Heroku using the heroku plugin, no need to install Heroku CLI on your machine, FluentCI will handle everything for you.

The following commands can be used to deploy applications to Heroku:

# Deploy to Heroku, make sure to export HEROKU_API_KEY and HEROKU_APP_NAME
fluentci run --wasm heroku deploy --app $HEROKU_APP_NAME --api_key $HEROKU_API_KEY

CI/CD pipeline integrations

The following examples show how to integrate FluentCI with popular CI providers to deploy applications to Heroku:

ci.yml
name: ci
on:
push:
branches:
- main
jobs:
tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Fluent CI
uses: fluentci-io/setup-fluentci@v5
- name: deploy
run: fluentci run --wasm heroku deploy --app $HEROKU_APP_NAME --api_key $HEROKU_API_KEY
env:
HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME }}
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}