Skip to content

Instantly share code, notes, and snippets.

@s4wny
Last active February 8, 2017 18:44
Show Gist options
  • Save s4wny/3f0f227fd1fbdf6d6f31 to your computer and use it in GitHub Desktop.
Save s4wny/3f0f227fd1fbdf6d6f31 to your computer and use it in GitHub Desktop.
Git hooks/post-receive
#!/bin/bash
WORKSPACE=/var/www/html/
echo "Post-receive"
git --work-tree=$WORKSPACE checkout -f
cd $WORKSPACE
####################
##### OPTIONAL #####
####################
##
## Laravel 5 setup
##
echo "Composer install"
composer install
echo "artisan migrate"
php artisan migrate
echo "npm install"
npm install
echo "gulp prod"
gulp --production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment