$ sudo apt-get install python-pip $ sudo pip install ghp-import
Then in Makefile (assume your static website are located in /home/usrname/dev/mywebsite/):
publish_to_github_project_pages: cd /home/usrname/dev/; ghp-import mywebsite; git push origin gh-pages
Note that I put several commands in one line. If your Makefile is not located in /home/usrname/dev/, the following will not work:
publish_to_github_project_pages: # wrong way cd /home/usrname/dev/ ghp-import mywebsite git push origin gh-pages
Because when GNU make executes every line of command, it executes the command at current directory of of Makefile. So when ghp-import try to find mywebsite directory in current directory, it will find nothing and report error.
|||Publishing to GitHub - Tips — Pelican 3.7.1.dev0 documentation|