Created
October 19, 2023 16:47
-
-
Save Ale-Code404/07fb23d92b0433723b9ac9985e4b2742 to your computer and use it in GitHub Desktop.
Template para implementar compilacion tipo CI en el hook "post-receive" en un proyecto Laravel
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 | |
site=/var/www/{site_name} | |
git_dir={project_git_directory} | |
git --work-tree="${site}" checkout -f main | |
cd $site | |
#Install composer dependencies | |
composer install --no-dev | |
composer dump-autoload | |
#Clear all cache | |
php $site/artisan config:clear | |
#Install node dependencies | |
npm i --omits=dev | |
#Compile assets | |
npm run production | |
echo "Success deploy..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment