-
Clone autodeploy.js to your server
-
update REPO folder field in autodeploy.js to point to your project
-
update relevant commands in autodeploy.js to handle git pull, server restart command
-
launch the script, it listens at port 888 by default
-
Head to your project's Github settings page and click on add webhook
- Enter the URL for the webhooks, it should be your_url + port 888
- Done.