Skip to content

Instantly share code, notes, and snippets.

@myinitialsaretk
Created August 8, 2013 20:07
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 myinitialsaretk/6188223 to your computer and use it in GitHub Desktop.
Save myinitialsaretk/6188223 to your computer and use it in GitHub Desktop.
How we deploy.
On Server
=========
cd /home/deployments/beta_public_html
git init
nano .git/hooks/post-receive
Use the following as a boilerplate:
---
#!/bin/sh
cd ..
GIT_DIR='.git'
umask 002 && git reset --hard
chmod -R 755 *
--
chmod +x .git/hooks/post-receive
On Local
========
We use public key authentication to our servers.
Setup Git Remote as: beta
path: ssh://user@domain.com/home/deployments/beta_public_html
Then push to: beta
and our code is live.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment