Created
October 2, 2013 14:18
-
-
Save patricksimpson/6794502 to your computer and use it in GitHub Desktop.
Lightweight github deployment. Requires (Expect) on your client box. You must setup the remote server first, by creating the remote path, and setting up a github clone of your repository. You can either setup an install script on the server, or run your install commands from this file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect | |
set password "thepassword" | |
set login "yourlogin" | |
set host "199.199.199.199" | |
set remotepath "/var/www/html/yoursite.com" | |
spawn ssh $host -l $login | |
expect "$login@$host's password: " | |
send "$password\n" | |
send "cd $remotepath\n" | |
#Deployment | |
#send "./install-server.sh\n" "Custom/Complex install script if needed. | |
send "cd public\n" | |
send "git pull\n" | |
interact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment