Heroku Django Deploy Github Action CD CI

Tafadzwa L Nyamukapa
2 min readDec 1, 2020

--

A simple github action that automatically deploys Django app to heroku.

The github action can be found on github market place here.

The repo can be found here. I encourage and welcome all pull requests.

*You can checkout a You-tube Video Full Course here(How i created the Heroku django Deploy using Node js )

Getting Started

heroku-django-deploy uses three methods to deploy your Django app to heroku ie.

  1. Deploy with git
  2. Deploy with Container Registry (Docker deploy)
  3. Deploy with Heroku Build Manifest (Docker deploy)

Unless you are using git make sure you have a Procfile or a Dockerfile or a heroku.yml in your project root directory together with the requirements.txt file.

1. Deploy with git

By default if you do not specify the deployment option it will use git or else alternatively specify the use_git: true option in the with tag. see example below.

2. Deploy with docker container registry

Make sure you specify the deployment option ie use_docker option. Also make sure you have a Procfile, Dockerfile, and requirements.txt files in your root project directory.

3. Deploy with heroku build manifest

Make sure you specify the deployment option ie use_build_manifest option. Also make sure you have a heroku.yml or Dockerfile, and requirements.txt files in your root project directory.

Options

The action has multiple options here is a list of options you can use under the with flag in your workflow:

Example

A full working example can be found under tests in the github repo here.

Pull Requests and Contributions

I Welcome and i encourage all Pull Requests. Lets make the repo big :)

Github repo here

Created and Maintained by

License

This project is licensed under the MIT License — see the LICENSE file for details

--

--

Tafadzwa L Nyamukapa
Tafadzwa L Nyamukapa

Written by Tafadzwa L Nyamukapa

Software Engineer with a huge passion for building software and explore new technologies. FinTech | CKA | Java | Django | AI | Js | System Architect | Cloud

No responses yet