Skip to content

GitHub Action to upload and trigger build on Heroku

License

Notifications You must be signed in to change notification settings

behe/heroku-build

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Heroku Build

GitHub

Getting Started

To get started using the action, just make sure to have a Procfile or a Dockerfile in your project and then create a folder called .github and inside it, create another folder called workflows. Finally inside the workflows folder, create a file called main.yml with the following contents:

.github/workflows/main.yml

name: Deploy

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Deploy to Heroku
        uses: behe/heroku-build@v1
        with:
          app-name: "your-app-name-on-heroku"
          api-key: "${{secrets.HEROKU_API_KEY}}"
          path: "optional-path-of-build-to-deploy"

Now go to your Heroku account and go to Account Settings. Scroll to the bottom until you see API Key. Copy this key and go to your project's repository on GitHub.

In your Repo, go to Settings -> Secrets and click on "New Secret". Then enter HEROKU_API_KEY as the name and paste the copied API Key as the value.

You can now push your project to GitHub and it will be automatically deployed to Heroku henceforth.

You learn more about GitHub Secrets here and GitHub Actions here

About

GitHub Action to upload and trigger build on Heroku

Resources

License

Stars

Watchers

Forks

Packages

No packages published