GithubHelp home page GithubHelp logo

heroku-action's Introduction

Heroku Action

A GitHub Action for deploying on Heroku. Based on heroku-deploy

Basic Example

In this example you must have a Procfile in the project directory and create the following file (.github/workflows/main.yml)

name: Deploy

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: corim707/[email protected] # This is the action
        with:
          heroku_email: "[email protected]"
          heroku_api_key: ${{secrets.HEROKU_API_KEY}}
          heroku_app_name: "this-is-an-example"

Options

You can configure the deploy to heroku passing some options to the action

Name Type Description Example Required Default
heroku_api_key string Used like a password for authentication. Visit your profile settings on Heroku to obtain. "0a3efa20-0a3efa20a3efa2" true -
heroku_email string Heroku account's email. "[email protected]" true -
heroku_app_name string The name of the Heroku app that you are deploying. It must be all in minus and separated using "-". "this-is-an-example" true -
branch string The name of the repository branch that you want to upload to Heroku. "main", "deploy", "test" false Uploads "HEAD" content
useforce bool Set in true if you want to add --force to the push to Heroku command. true, false false false
appdir string Directory that you want to deploy to Heroku. "project", "deploy" false Root of repository
procfile string Content of the Procfile. It will be created dynamically and uploaded only to Heroku. "web: npm start" false No Procfile creation
dynamicFiles string Set to the path of the dynamically created files relative to the root directory created by others steps in the GitHub Action. "dist" false false
buildpacks string If you want to add custom buildpacks to the project pass the URLs in string array format. There will be installed respecting the order used. "['url_buildpack1','url_buildpack2']" false No buildpacks
env_file string Path to a .env file ".env", "secrets/.env/" false No env file

Example with some options

name: Deploy

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: corim707/[email protected] # This is the action
        with:
          heroku_email: "[email protected]"
          heroku_api_key: ${{secrets.HEROKU_API_KEY}}
          heroku_app_name: "this-is-an-example"
          useforce: true,
          dynamicFiles: true,
          procfile: "worker: npm start",
          buildpacks: "['https://github.com/heroku/heroku-buildpack-nodejs.git','https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git']"

heroku-action's People

Contributors

corim707 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.