Skip to content

Loading content onto Pi from GitHub

Thomas Lamb edited this page Apr 8, 2018 · 3 revisions

Initial Setup

  1. Grab the repository clone URL from GitHub
  2. then SSH into Pi
  3. Create a folder to store the project... say maybe /git/pi_alarm_prod
sudo mkdir /git
sudo mkdir /git/pi_alarm_prod
  1. Install Git
sudo apt-get install git
  1. run sudo git clone <clone URL> /git/pi_alarm_prod
  2. Make a symbolic link to the /var/www directory:
sudo ln -sfd /git/pi_alarm_prod/app /var/www
  1. when you make changes to repository then just need to run sudo git pull
  2. and finally restart the web services
sudo service nginx restart
sudo service uwsgi restart

Getting recent changes

  1. Change directory to the Git folder:
cd /var/www
  1. Run command to pull latest changes (using sudo because the /var/www folder security permissions)
sudo git pull
  1. Restart the web services
sudo service nginx restart
sudo service uwsgi restart
Clone this wiki locally