A Node.js continuous deployment system for Github and TravisCI. It detects a hook from Github when a repo is pushed, or from Travis when tests are complete, and pulls the changes in the server side repo using github-getter. Then it runs the script in post-receive to build and push live.
An example setup script that we use to set up the deployment system can be found here.
$ npm install -g github-listener
Usage: github-listener [options]-h|--help display this help message-v|--version display the version number-q|--quiet suppress logging-p|--port port to run Github Listener on-c|--config path to JSON config file (default ./config.json)
config.json file is needed to tell the server what commands are run and the secret used in the Github or Travis hook.
In order for your listener to receive payloads you need to set up a webhook on Github or Travis:
If the service you are using does not sign the payloads or provide authorisation headers, you can use the
url_secret option and add a
?secret= to the webhook url.
secret- verify payload if URL secret in
branch- run build if branch in payload matches this (defaults to master if omitted)
semver- run build if branch in payload matches semver (e.g. v1.2.3)
See the DOCUMENTATION.md file.
npm test will run some tests which cover the majority of the functionality.
You can also send test payloads to a server with the
payload.js program to test the front end:
npm start will start the server.
See the LICENSE file.