Deploying slam mirrorbot on Heroku with Github Workflows - fnjerry/slam-mirrorbot GitHub Wiki
Pre-requisites
-
Githubaccount
-
Heroku account
Recommended to use 1 App in 1 Heroku account
Don't use bin/fake credits card, because your Heroku account will get banned
Heroku is free service, so don't expect too much -
Text editor
Deployment
- Star and Fork repo then then upload token.pickle to your forks, or you can upload your token.pickle to your Index and put your token.pickle link to
TOKEN_PICKLE_URL
(Recommended) (NOTE: If you don't upload token.pickle uploading will not work). - Go to Repository
Settings
->Secrets
![Settings] (https://camo.githubusercontent.com/c07cdcc1717a519b3425ce45cae2c9e5155201de51b4544772f32491933c9fa7/68747470733a2f2f74656c656772612e70682f66696c652f6262386362306563656435636161643638613431622e6a7067) - Add the below Required Variables one by one by clicking
New Repository Secret
everytime.
-
HEROKU_EMAIL
: Heroku Account Email Id in which the above app will be deployed -
HEROKU_API_KEY
: Your Heroku API key, get it from https://dashboard.heroku.com/account -
HEROKU_APP_NAME
: Your Heroku app name, Name Must be unique -
CONFIG_FILE_URL
: Fill this in any text editor. Remove the_____REMOVE_THIS_LINE_____=True
line and fill the variables. For details about config you can see Here. Go to https://gist.github.com/ and paste your config data. Rename the file toconfig.env
then create secret gist. Click on Raw, copy the link. This will be yourCONFIG_FILE_URL
. Refer to below images for clarity.
-
NOTE: Remove commit id from raw link to be able to change variables without updating the CONFIG_FILE_URL in secrets. should be in this form: https://gist.githubusercontent.com/username/gist-id/raw/config.env
-
After: https://gist.githubusercontent.com/anasty17/8cce4a4b4e7f4ea47e948b2d058e52ac/raw/config.env
-
You only need to restart your bot after editing
config.env
Gist secret.
-
After adding all the above Required Variables go to Github Actions tab in your repo
-
Select
Manually Deploy to Heroku
workflow as shown below:
-
Then click on Run workflow
-
Done
! your bot will be deployed now.
NOTE
- Don't change/edit variables from Heroku if you want to change/edit do it in
config.env
from your gist, after it just restart your Heroku app.
Credits
- AkhileshNS for Github Workflow method to deploy Heroku app