Last active
August 29, 2015 14:22
-
-
Save EduardoMRB/fca9a8cef521b6c60a13 to your computer and use it in GitHub Desktop.
PHP deploy skeleton
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
#!/bin/bash | |
set -e | |
# file: hooks/post-receive inside git repository. | |
$WORK_DIR=path/to/work/directory | |
$GIT_DIR=path/to/git/directory | |
git --work-tree=$WORK_DIR --git-dir=$GIT_DIR checkout -f | |
# enter work dir and download dependencies, set up env variables, etc. | |
cd $WORK_DIR | |
# downlaod composer | |
curl -sS https://getcomposer.org/installer | php | |
# install dependencies | |
php composer.phar install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment