Node Git Deploy
An ExpressJS implementation that listens for a git push event on a specific branch (via a webhook) and automatically updates your cloned repo in your server.
Usage
- Add a webhook to your repo through your repo's Settings -> Webhooks
- Enter your Payload URL (the live URL of this cloned application)
- Select "application/json" for the Content type.
- Add your secret key.
- Select "Just the push event." for the event type.
- Copy constants/constants.example.js and rename to constants.js
- In the constants.js, set the branch that you want to listen to. And change the secret key that you added from step #4.
- Copy shell_scripts/deploy.example.sh and rename to deploy.sh
- Enter the git commands or other bower/npm commands that you want to perform on a push event.
You should be good to go! Do a test push and see if the app responds to the webhook event.