This is meant to go after the git pull statement in your deployment script.
It will only run composer update if composer is in the the commit message.
| [ -f git-log.txt ] && rm git-log.txt | |
| git log -1 --pretty=%B > git-log.txt | |
| if grep -Fq 'composer' git-log.txt; then | |
| composer update --no-interaction | |
| fi | |
| php artisan migrate --force | |
| php artisan cache:clear |