Skip to content

Updating your token agent on Heroku

Ben edited this page Aug 2, 2020 · 3 revisions

The Heroku button featured in the project Readme is great for deploying the latest version of the app, but it doesn't help you to update your app once it's deployed. To do this, follow these instructions:

First time users: both options below require you have the Heroku Command Line tool installed and logged into your Heroku account.

From there, there are two options:

Using Git from the Command Line

Follow these steps to update your heroku app with the latest version of Instagram Token Agent.

  1. Clone the repository to your machine git clone https://github.com/companionstudio/instagram-token-agent.git
  2. Add the remote for your app on Heroku: heroku git:remote -a [YOUR_HEROKU_APP_NAME]
  3. Push the latest version of the agent to Heroku: git push heroku

That's it. Your app will restart to run the new version.

Updating without the command line

This method uses GitHub's desktop app, so download and install that if you haven't already. These steps are based on GitHub for Mac, but they should be very similar on Windows or Linus.

  1. In Github desktop, clone the instagram-token-agent repository: companionstudio/instagram-token-agent
  2. Go to Repository → Repository Settings and change the 'Primary remote repository to https://git.heroku.com/[YOUR HEROKU APP NAME].git
  3. Got to Repository → Push or hit [CMD/CTRL] + P to push the latest version to Heroku. This might take a few seconds.

That's it. Your app will restart to run the new version.

Note: Github Desktop is a bit annoying, in that it doesn't provide a way to manage more than the primary remote. This means that each time you update, you'll need to change the remote to Github, pull the latest code, then change it back to Heroku, then push. If you can set up the Heroku remote in the command line (heroku git:remote -a [YOUR_HEROKU_APP_NAME]), you can then use GitHub Desktop to pull and push without touching the settings again.