Skip to content

Instantly share code, notes, and snippets.

@devSarry
Forked from s4wny/post-receive.sh
Created February 8, 2017 18:44
Show Gist options
  • Save devSarry/5589e98d4e99af4a0e935ae8fa89b368 to your computer and use it in GitHub Desktop.
Save devSarry/5589e98d4e99af4a0e935ae8fa89b368 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