The Heroku Action connector will trigger a build of your Heroku app.
Set up Heroku
Perform the following steps to set up the Heroku action connector:
- In the Configure Action section, select the Heroku connector.
![Select-Connector.png](https://images.contentstack.io/v3/assets/blt23180bf2502c7444/blt947ec8765e871151/6346f79745693810d212e5d9/Select-Connector.png)
- Select the Trigger a build action.
![Select-Action.png](https://images.contentstack.io/v3/assets/blt23180bf2502c7444/blt27335702c28b3551/6346f797d3cd0a1151ef8616/Select-Action.png)
- Click the + Add New Account button to select your Heroku account.
- Now, add a suitable Title and the API Key of your Heroku app to connect your Heroku account with Contentstack.
![Authorize-Button.png](https://images.contentstack.io/v3/assets/blt23180bf2502c7444/bltc3fc0a17d69f0514/6346f796d7dfe71371561380/Authorize-Button.png)
To get your Heroku app's API Key, log in to the Heroku dashboard, and perform the following steps:
- Click on Account Settings under the user profile.
- Click on the Account tab, and you will find your API Key.
![Heroku_Dashboard.png](https://images.contentstack.io/v3/assets/blt23180bf2502c7444/blt5b89a6552ace9b36/62983c5ce95fa50f854dbc40/Heroku_Dashboard.png)
Additional Resource: For more information, refer to the How to generate an API Key document.
- Once done, click on Authorize.
- Under the Source-blob url section, add the url where the source code of your build is present.
Note: If you are using a public GitHub repo for your source code then the url will be in the following format:
https://api.github.com/repos/<username>/<repo_name>/tarball/<branch_name>/</branch_name></repo_name></username></repo_name></repo_name></username>
Example:
https://api.github.com/repos/username/samplename/tarball/master/
For a private GitHub repo use the following format:
https://:@api.github.com/repos/<username>/<repo_name>/tarball/<branch_name>/
</branch_name></repo_name></username></token></user_name>
Example:
https://username:sampletoken@api.github.com/repos/username/samplename/tarball/master/
- Under the App name/ id section, select the app that you have created in Heroku.
- You can mention a Version for your build. This is an optional step which will help you keep track of the latest version for your build.
- Finally, click on the toggle button if you want to Hide optional fields and then click on Proceed.
![Proceed.png](https://images.contentstack.io/v3/assets/blt23180bf2502c7444/blt7dc8417a8e424426/6346f797b3edf9106f5036d6/Proceed.png)
- Click on Test Action to test if a build is created in Heroku. In the output section, you can view the status of your build.
![Test-Action.png](https://images.contentstack.io/v3/assets/blt23180bf2502c7444/blt5eae6d5ddaf492b4/6346f7973aad9e1061a0be04/Test-Action.png)
- Once set, click on Save and Exit.
![Save-Exit.png](https://images.contentstack.io/v3/assets/blt23180bf2502c7444/blt8b105558e128faac/6346f79759c8ec116d1407a0/Save-Exit.png)
The action will deploy a build in your Heroku project. You can check the build and open the respective app you deployed using the Heroku connector.
![Final-Output.png](https://images.contentstack.io/v3/assets/blt23180bf2502c7444/blt6550c8b1a59d1554/6346f79738b64110d92e9e7f/Final-Output.png)
This sets up the Heroku action connector.