Created
April 30, 2019 18:53
-
-
Save bcreeves/bc228bc86ac9fda3f330bb3141bccc23 to your computer and use it in GitHub Desktop.
Laravel git hook for deployment to cpanel server
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
#!/bin/sh | |
umask 022 | |
GIT_WORK_TREE=~/laravel git checkout -f | |
cd ~/laravel | |
scl enable ea-php72 'php artisan config:cache' | |
# Check if composer.json exists | |
if [ -f composer.json ]; then | |
scl enable ea-php72 'composer install' | |
scl enable ea-php72 'composer dump-autoload' | |
fi | |
scl enable ea-php72 'php artisan migrate --force' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment