Simple Module for Deploying updates from GitHub using NodeJS.
This is a simple tool used to deploy your package (GitHub Repo) to a Server when a PUSH event has occurred on the Repository. The NodeJS Script runs on a Specfied port and waits for the call. To call the script, we setup a WebHook on Github. Whenever a PUSH event occurs, GitHub POST's the details of the push to a given Payload URL. When the Script receives the payload, it verifies the authenticity of the payload. Once it is verified, the updates are pulled from GitHub repository and all the Node Modules are re-synced. Once the above operations are completed, the app which is running on pm2 is restarted.
- A Server with Static IP / Tunneling Service.
- That Server running on Linux.
npm install nodejs-ads --save
Example
var updater = require('nodejs-ads')
updater.start("YOUR_SECRET_KEY", PORT);
- Navigate to Repository Settings.
- Select Webhooks and Click on Add Webhook.
- Enter the Payload URL as http://YOUR_IP_OR_DOMAIN:PORT/deployment/updatetheapp- PORTis the port number used in the- updater.startfunction.
 - Alternatively you can also use TUNNELING_URL/deployment/updatetheapp
 
- Change Content Type to application/json.
- Enter  YOUR_SECRET_KEYin the Secret Field.- YOUR_SECRET_KEYis the key used in the- updater.startfunction.
 
- Select Just the push eventunder Which events would you like to trigger this webhook?
- Check the Active Box and click on Add Webhook.
- UPI :  pranavms13@apl
- XMR :  84B2PEVJjenN31h8HcnY4uCFPVcicxvVCAJAYVeYnPLoHkaVGHHWpVxCm6Gn9beEir2CjffgEoXtiDjpAZCmy4ap6uUXT8Y
- BTC :  3Jg45PbpUNtASL5uvQSeJKZyiExqbB9mbC