Last active
February 5, 2017 23:21
-
-
Save shaz-r/4f93695fdd27bf64048c to your computer and use it in GitHub Desktop.
Deployment to a web-server using Git
This file contains hidden or 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
- 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