Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dentarg/heroku
GitHub Action to deploy your app to Heroku
https://github.com/dentarg/heroku
deployment github-actions heroku
Last synced: about 1 month ago
JSON representation
GitHub Action to deploy your app to Heroku
- Host: GitHub
- URL: https://github.com/dentarg/heroku
- Owner: dentarg
- Created: 2022-04-21T20:38:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-17T16:14:08.000Z (9 months ago)
- Last Synced: 2024-09-18T17:33:36.403Z (about 2 months ago)
- Topics: deployment, github-actions, heroku
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# heroku
`dentarg/heroku` is an [composite run steps action] that deploys your app to Heroku, by `git push`.
The Heroku API key (`HEROKU_API_KEY`) needs to be saved as a [secret in GitHub Actions]. Use [`heroku authorizations`] to generate the API key, see this [Heroku help article] for more information.
If you pass `github-token`, the action will create [deployments] in your repository. When you use this, the workflow needs not to be triggered by the [`push` event] to work. See the example below.
The example workflow below deploys the app when the `CI` workflow ran succesfully against the default branch.
```yaml
name: Deploy to Herokuon:
workflow_run:
workflows: [CI]
types: [completed]jobs:
deploy:
if: |
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == github.event.repository.default_branch
concurrency: myapp
runs-on: ubuntu-latest
steps:
- uses: dentarg/heroku@v1
with:
app: myapp
key: ${{ secrets.HEROKU_API_KEY }}
sha: ${{ github.event.workflow_run.head_commit.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
```[composite run steps action]: https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/creating-a-composite-run-steps-action
[secret in GitHub Actions]: https://docs.github.com/en/actions/security-guides/encrypted-secrets
[`heroku authorizations`]: https://github.com/heroku/cli/blob/master/docs/authorizations.md
[Heroku help article]: https://help.heroku.com/PBGP6IDE/how-should-i-generate-an-api-key-that-allows-me-to-use-the-heroku-platform-api
[deployments]: https://docs.github.com/en/rest/deployments/deployments
[`push` event]: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push