Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshbetz/node-github-auto-deploy
Github auto deploy webhook server
https://github.com/joshbetz/node-github-auto-deploy
Last synced: 7 days ago
JSON representation
Github auto deploy webhook server
- Host: GitHub
- URL: https://github.com/joshbetz/node-github-auto-deploy
- Owner: joshbetz
- License: mit
- Created: 2015-05-31T03:16:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-31T04:48:52.000Z (over 9 years ago)
- Last Synced: 2023-03-14T03:00:30.164Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/github-auto-deploy
- Size: 145 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Github Auto Deploy
[![Build Status](https://travis-ci.org/joshbetz/node-github-auto-deploy.svg)](https://travis-ci.org/joshbetz/node-github-auto-deploy)
## Overview
Usage: `gad []`
`github-auto-deploy` runs a small node webserver that responds to deployment requests from Github and updates the local repository.
A post-deploy script can also be used to finish a deployment after code has been updated.## Example
```
PORT=1234 SECRET="Swifty4Lyfe" gad /var/app /var/app/bin/deploy.sh
```## Configuration
The webserver can be configured with some environmental variables.
* `PORT` - The port that the server runs on. Default: 3420
* `SECRET` - The webhook secret. Default: noneOn Github, you'll need to:
1. Add a 'Github Auto-Deployment' service.
2. Add a webhook that fires on 'deployment' events.
3. If the repo is private, add a deploy key.Note: By default, the Github Auto-Deployment service will create deployments every time code is pushed to `master`, but can also be configured to deploy on status contexts, like `ci/travis-ci` or `ci/circle-ci`.
## FAQ
- Why are you using the
deployment
event? - The deployment event lets us deploy on status, like
ci/travis-ci
, which means we can require tests to pass before a deploy will run. - Why are you using
git fetch
andgit checkout
? - We want all changed files to be updated on the server as close to the same time as possible to avoid serving some old and some new files for a given request. Another approach is using symlinks and moving file pointers around.