I am trying to auto-deploy the project and npm commands run perfectly but when it goes to a line where pm2 restarts the specific projects, then actions fails.
GitHub Actions Error:
GitHub Actions Error
GitHub Action .yml file content:
yml file
NOTE: This solution is applicable only when you are using an NVM to manage node.js versions
The issue is because of the missing symbolic link for the node and the pm2, here are the commands that you can use to create a symbolic link:
sudo ln -s "$NVM_DIR/versions/node/$(nvm version)/bin/node" "/usr/local/bin/node"
sudo ln -s "$NVM_DIR/versions/node/$(nvm version)/bin/npm" "/usr/local/bin/npm"
sudo ln -s "$NVM_DIR/versions/node/$(nvm version)/bin/pm2" "/usr/local/bin/pm2"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With