Skip to content

Instantly share code, notes, and snippets.

@patricksimpson
Created October 2, 2013 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patricksimpson/6794502 to your computer and use it in GitHub Desktop.
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.
#!/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