Update CodiLIA after deploying to Heroku

LiaScript Feb 01, 2021

The following guide will explain, how you can update your personal CodiLIA instance on Heroku, if you have installed it via the Heroku-deploy button. The instructions are based on the F/A.NZ article on "Manually update app after 'Deploy to Heroku' on GitHub".

Login to Heroku

Before you can log in to Heroku, you need to install the heroku-cli interface: Heroku CLI

After entering the following command, you will be asked to press any key. By doing so, your default browser is opened, where you are asked to log in. If your login is successful, then this is also visible in the shell.

$ heroku login

heroku: Press any key to open up the browser to login or q to exit: 
Opening browser to https://cli-auth.heroku.com/auth/cli/browser/4c44b96....
Logging in... done

Cloning the Project via git:

Before you can clone the repository via git, you will need to install git-cli interface: Git-CLI

$ git clone https://github.com/liascript/codilia

Cloning to 'codilia' ...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 19232 (delta 0), reused 1 (delta 0), pack-reused 19223

After doing that, switch into the folder and if you are in within the develop-branch, then simply change to master:

$ cd codilia
$ git checkout master

Add Heroku as remote / origin

... and add the Heroku repository as remote / origin. It is important that you replace my-project with your Heroku remote project name. In my case this is codilia, since my project is hosted at https://codilia.herokuapp.com

$ heroku git:remote -a my-project

set git remote heroku to https://git.heroku.com/my-project.git

Push the current repo to Heroku

Now we just need to push the latest version to Heroku. If all goes well, your app will now build and run.

$ git push heroku master

remote: Compressing source files... done.
remote: Building source:
remote: -----> Building on the Heroku-18 stack
remote: -----> VIPS app detected

remote: -----> Compressing...
remote:        Done: 306.3M
remote: -----> Launching...
remote:  !     Warning: Your slug size (306 MB) exceeds our soft limit (300 MB) which may affect boot time.
remote:        Released v14
remote:        https://********.herokuapp.com/ deployed to Heroku
remote: Verifying deploy... done.
To https://git.heroku.com/*******.git
   c3d58afa..5556a88e  master -> master

That's it, your instance should be up to date...