Answer the question
In order to leave comments, you need to log in
How to automate deploy from GitHub to Hosting?
Hi all.
For two days I figured out how to deploy from GitHub to hosting. Understood.
1. I created an SSH public key on the hosting, added it to the GitHub settings.
2. Connect:
$ ssh -T [email protected]
Hi pawlek! You've successfully authenticated, but GitHub does not provide shell access.
$ cd example.com/www/
$ git checkout master
$ git pull
$ ssh <command>
Answer the question
In order to leave comments, you need to log in
Write a bash script that will do all this, and for automation push it into cron.
sshpass -pPASSWORD ssh -T [email protected] cd example.com/www;git checkout master;git pull
ssh -T [email protected] cd example.com/www;git checkout master;git pull
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question