Open drthoben opened 3 years ago
I also have this problem. I am using pm2 v4.5.1 I saw the fix from this issue: https://github.com/Unitech/pm2-deploy/issues/23 I copied the fix into my code and it is working as expected.
I experienced the same issue today. In my case it wasn't because git diff
detected changes, but because it didn't work at all. The local git, running in a vagrant machine (!), was running under a different user than the directories were and this triggered https://git-scm.com/docs/git-config/2.35.2#Documentation/git-config.txt-safedirectory
Once I fixed this git setting, it worked.
--force
also worked, because it didn't ran the commands too.
When deploying my Node.js application using a local ecosystem file which is not part of the repository from an arbitrary folder on my server I'm getting the following error:
I've discovered that if I
cd
into the repository folder first and then run the deploy script, deployment works as aspected. I did not expect this behaviour and could not anything related to it in the docs therefore it would be nice if would be mentioned in the docs somewhere.Maybe it's even possible that the deploy script
cd
's into the repository folder first before pulling.I'm using
pm2 v4.5.0
.