Hacker News new | ask | show | jobs
by kachurovskiy 739 days ago
I just added a magic URL in my app that GitHub calls whenever a commit is pushed and the server does `git pull` which in turn causes pm2 to reload the app. So committing anything shows up in production in seconds. Great for smaller projects.
2 comments

I have a similar setup, using snare to handle the webhook endpoint: https://github.com/softdevteam/snare

GitHub will call the webhook after a push to main and a successful test suite run. Snare runs a shell script on my server to git pull, build, deploy, and call a cronitor.io hook for monitoring deploy success.

I've been pretty happy with how relatively simple it is and how well it works.

How did you set this up? Seems simple yet effective.