Not sure what others do, but I just compile my assets locally and commit to git. One less thing for the server to worry about.
Front End Deployment Strategy
Hi fellow Forge-rs!
What's your deployment strategy for front end builds?
"yarn" + "gulp --production" in your deploy script?
E.g.
cd /home/forge/default
git pull origin master
composer install --no-interaction --prefer-dist --optimize-autoloader
if [ -f artisan ]
then
php artisan migrate --force
fi
yarn
gulp --production
Cheers!
@jamesfurey Really, it is a matter of choice but most of us run gulp --production and then commit to the repo before pushing. You do not have to do that way but keep in mind that the more tasks you ask the server to do for each deploy, increases the chances of a failed deployment. Having a failed deployment equals hours of wasted time...your time. Additionally, by running the production scripts before deployment, you can test and make sure that the processed files actually work...again saving hours of your time.
The way I do it is I develop on a dev branch and merge to master when I want to deploy via Envoyer/Forge. Master is connected to the autodeploy script. I hope that helps you figure it out.
Please or to participate in this conversation.