-
Notifications
You must be signed in to change notification settings - Fork 0
Set up Octopi Webapp for Heroku Pushing
This is a guide to set up Octopi-Webapp and LaPlaya so that you can push a new version to Heroku. This guide is based around, for the most part, the Github app for Mac. It should work similarly in Windows, but I haven't tested the command-line segments yet. However, the final step, pushing to heroku, does require command line use of the git tool.
- Install GitHub.app for Mac and launch it. It will ask you to login. Make sure to click the button to install the git commandline tools, if you do not already have them installed.
- Make an account on Heroku.com and email an administrator for octopi-webapp for collaboration permission on Heroku.
- From the github app, click on
ucsb-cs-education
on the left, and clickClone to Computer
next toucsb-cs-education/octopi-webapp
. - Click on the
My Repositories
button on the left. - Click on the
+
button on the bottom, and hitAdd local repository...
- Navigate to the directory you cloned
octopi-webapp
to, and then navigate to thepublic/student_portal/laplaya
directory within that. - Hit add while the
laplaya
directory is selected. - Select
laplaya
from your list of repositories, and then hit the settings tab. - Change the Primary remote repository to
[email protected]:ucsb-cs-education/laplaya.git
, and hitupdate remote
. - Install the heroku toolbelt
- Open your terminal, and navigate to the octopi-webapp repository.
- Type
heroku login
, and enter your credentials - Type
heroku git:remote add -a octopi
. This will set up a new remote in your git repository for heroku - Checkout the heroku branch in your local repository (git checkout heroku). You can now push this branch to heroku with:
git push heroku heroku:master
. Make sure to keep the heroku branch on github and on heroku in sync. Whenever you do agit push heroku heroku:master
is pushes the local branchheroku
to themaster
branch on heroku (the master branch is what runs on the web). Make sure to also do agit push origin heroku
so that you push your local heroku branch to github as well.
You need to change into the laplaya
directory within octopi-webapp, and pull in your latest changes from github there. Then, when you change back to the octopi-webapp directory, git status
should show that 'laplaya' has changed. Commit these changes ('Updated laplaya' is fine as a commit message for just a laplaya update) to octopi-webapp and then push it to heroku as outlined with git push heroku heroku:master
to deploy a new version.