Skip to content

Instantly share code, notes, and snippets.

@shaz-r
Last active February 5, 2017 23:21
Show Gist options
  • Save shaz-r/4f93695fdd27bf64048c to your computer and use it in GitHub Desktop.
Save shaz-r/4f93695fdd27bf64048c to your computer and use it in GitHub Desktop.
Deployment to a web-server using Git
- Initialize bare repo in remote host
- Post-recieve hook to checkout files into dir
- Add line for composer install too
#!/bin/sh
echo "Checking out:"
GIT_WORK_TREE=/var/www/dirname git checkout -f
echo "Composer install:"
# Install or update packages specified in the lock file
cd /var/www/release && composer install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment