Skip to content

Commit

Permalink
Updated version to 3.11.9
Browse files Browse the repository at this point in the history
  • Loading branch information
AkhileshNS committed Feb 13, 2021
1 parent fc68464 commit ca36fb1
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 60 deletions.
99 changes: 40 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand All @@ -64,57 +64,38 @@ You learn more about GitHub Secrets [here](https://docs.github.com/en/actions/co
## Important Note
**Please Note**: Git has recently announced that it is planning to switch the default branch's name from "**master**" to "**main**". For this reason, the Action also pushes to the "**main**" branch in the heroku origin by default. If you created your heroku app before **21st July 2020**, then there's a good chance your app is still using the "**master**" branch. if you are using versions **3.10.9** or newer and run into this error, please switch your GitHub workflow file to include `remote_branch: master` as an option in the Action. Ex:
**Please Note**: Git has recently announced that it is planning to switch the default branch's name from "**master**" to "**main**". For this reason, the Action also pushes to the "**main**" branch in the heroku origin by default and if your Heroku App is still using the "**master**" branch, then the Action will automatically switch your Heroku remote to use "**main**" as the default branch. There is **No Action Needed** from you, just keep in mind that this change is occurring as you continue to use the App and if you ever need to manually deploy the App, you can do so using the following command:
_.github/workflows/main.yml_

```yaml
name: Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME"
heroku_email: "YOUR EMAIL"
remote_branch: master # <- Include this
```bash
git push heroku YOUR_BRANCH:refs/heads/main
```

## Options

The action comes with additional options that you can use to configure your project's behavior on Heroku. You can setup these options under the "with" object as presented above:

| Name | Required | Description | Example |
| --------------------------- | -------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| heroku_api_key | true | This will be used for authentication. You can find it in your heroku homepage account settings | \*\*\* |
| heroku_email | true | Email that you use with heroku | [email protected] |
| heroku_app_name | true | The appname to use for deploying/updating | demo-rest-api |
| buildpack | false | An optional buildpack to use when creating the heroku application | https://github.com/heroku/heroku-buildpack-static.git |
| branch | false | The branch that you would like to deploy to Heroku. Defaults to "HEAD" | master, dev, test |
| dontautocreate | false | Set this to true if you don't want to automatically create the Heroku app | true or false |
| dontuseforce | false | Set this to true if you don't want to use --force when switching branches | true or false |
| usedocker | false | Will deploy using Dockerfile in project root | true or false |
| Name | Required | Description | Example |
| --------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| heroku_api_key | true | This will be used for authentication. You can find it in your heroku homepage account settings | \*\*\* |
| heroku_email | true | Email that you use with heroku | [email protected] |
| heroku_app_name | true | The appname to use for deploying/updating | demo-rest-api |
| buildpack | false | An optional buildpack to use when creating the heroku application | https://github.com/heroku/heroku-buildpack-static.git |
| branch | false | The branch that you would like to deploy to Heroku. Defaults to "HEAD" | master, dev, test |
| dontautocreate | false | Set this to true if you don't want to automatically create the Heroku app | true or false |
| dontuseforce | false | Set this to true if you don't want to use --force when switching branches | true or false |
| usedocker | false | Will deploy using Dockerfile in project root | true or false |
| docker_heroku_process_type | false | Type of heroku process (web, worker, etc). This option only makes sense when usedocker enabled. Defaults to "web" (Thanks to [singleton11](https://github.com/singleton11) for adding this feature) | web, worker |
| docker_build_args | false | A list of args to pass into the Docker build. This option only makes sense when usedocker enabled. | NODE_ENV |
| appdir | false | Set if your app is located in a subdirectory | api, apis/python |
| healthcheck | false | A URL to which a healthcheck is performed (checks for 200 request) | https://demo-rest-api.herokuapp.com |
| checkstring | false | Value to check for when conducting healthcheck requests | ok |
| delay | false | Time (in seconds) to wait before performing healthcheck. Defaults to 0 seconds | 5 |
| procfile | false | Contents of the Procfile to save and deploy | web: npm start |
| rollbackonhealthcheckfailed | false | When set to true this will attempt to rollback to the previous release if the healthcheck fails | true or false |
| env_file | false | path to an env file (with respect to appdir) | /.env |
| justlogin | false | Set to true if you want the action to just login to Heroku and nothing else | true or false |
| region | false | The region in which you would like to deploy a server | eu or dublin |
| team | false | If deploying to an organization, then specify the name of the team or organization here | team-xyz |
| docker_build_args | false | A list of args to pass into the Docker build. This option only makes sense when usedocker enabled. | NODE_ENV |
| appdir | false | Set if your app is located in a subdirectory | api, apis/python |
| healthcheck | false | A URL to which a healthcheck is performed (checks for 200 request) | https://demo-rest-api.herokuapp.com |
| checkstring | false | Value to check for when conducting healthcheck requests | ok |
| delay | false | Time (in seconds) to wait before performing healthcheck. Defaults to 0 seconds | 5 |
| procfile | false | Contents of the Procfile to save and deploy | web: npm start |
| rollbackonhealthcheckfailed | false | When set to true this will attempt to rollback to the previous release if the healthcheck fails | true or false |
| env_file | false | path to an env file (with respect to appdir) | /.env |
| justlogin | false | Set to true if you want the action to just login to Heroku and nothing else | true or false |
| region | false | The region in which you would like to deploy a server | eu or dublin |
| team | false | If deploying to an organization, then specify the name of the team or organization here | team-xyz |

## Examples

Expand All @@ -137,7 +118,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand All @@ -164,7 +145,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand Down Expand Up @@ -203,7 +184,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand All @@ -230,7 +211,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand Down Expand Up @@ -259,7 +240,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand Down Expand Up @@ -288,7 +269,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand Down Expand Up @@ -317,7 +298,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand Down Expand Up @@ -348,7 +329,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand Down Expand Up @@ -378,7 +359,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand Down Expand Up @@ -408,7 +389,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand Down Expand Up @@ -441,7 +422,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand Down Expand Up @@ -476,7 +457,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand Down Expand Up @@ -523,7 +504,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand Down Expand Up @@ -552,7 +533,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9
- uses: akhileshns/heroku-deploy@v3.11.9
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME"
Expand All @@ -579,7 +560,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.10.9 # This is the action
- uses: akhileshns/heroku-deploy@v3.11.9 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ""
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "heroku-deploy",
"version": "3.10.9",
"version": "3.11.9",
"description": "A simple github action that dynamically deploys an app to heroku",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit ca36fb1

Please sign in to comment.