Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plesk Git additional deploy actions npm not executed

Tags:

git

node.js

plesk

I've connected Plesk to GitHub. Plesk gives the opportunity to run additional deployment actions after a branch was pulled. Pulling the branch works fine. But it seems, that these actions are not triggered.

I want to run the install:prod task from my package.json file. I can run this successfully via ssh. I've also tried to skip the prepending "npm run" part but without success. My current configuration looks like this.

npm run install:prod

The logs are showing no error message. It seems to silently fail.

like image 864
ppulwey Avatar asked Dec 21 '25 18:12

ppulwey


1 Answers

I had the same problem. The solution for me was to use the correct path on the additional deploy scripts, you can find out those by doing "which npm" and "pwd" for getting your website dir path. Once you have those you could use this lines on your deploy scripts, for example, assuming "httpdocs" is where your website is:

cd /var/www/vhosts/<your vhost>/httpdocs
/usr/bin/npm run install:prod
like image 82
Kuky Avatar answered Dec 23 '25 18:12

Kuky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!