canfiax
2169
32
Forge

Running `npm install` on server deploy using forge

Posted 3 years ago by canfiax

I would like to run npm install on the actual forge server, but I have heard that this will cause a timeout on the forge deploy script. Any advise? Is it tottaly stupid to run npm install on the server? It would be prefered because we are dealing with a lot of merge conflicts from autogenerated files every time we merge.

I imagine the deploy script something like this:

cd /home/forge/myapp
git stash
php artisan down
git pull origin production
composer install --no-interaction --no-dev --prefer-dist
php artisan migrate --force
npm install
webpack --p
gulp --production
php artisan up

Please sign in or create an account to participate in this conversation.