node.jsgitplesk

Plesk Git additional deploy actions npm not executed


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.


Solution

  • 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