summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorDave Cole <dave@developmentseed.org>2013-04-10 11:35:29 -0400
committerDave Cole <dave@developmentseed.org>2013-04-10 11:35:29 -0400
commit1f4b487caa217758245c6fbc819d001e61ac22cc (patch)
treed766f49d640712bdc2f54f1851fc6cb35cfedb67 /readme.md
parent5e47199c472a2052a7393e3493b8d7c95be53189 (diff)
Whitelist accounts. Set allowed branch as webhook parameter so it can vary based on repository.
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md22
1 files changed, 14 insertions, 8 deletions
diff --git a/readme.md b/readme.md
index 8527369..4d55e9e 100644
--- a/readme.md
+++ b/readme.md
@@ -5,6 +5,8 @@ A server that listens for webhook posts from GitHub, generates a website with Je
## Installation
- run `$ npm install` to install app dependencies
+- Set a [Web hook]() on your GitHub repository that points to your jekyll-hook server `http://example.com:8080/hooks/jekyll/:branch`, where `:branch` is the branch you want to publish. Usually this is `gh-pages` or `master` for `*.github.com` / `*.github.io` repositories.
+
## Configuration
@@ -15,25 +17,27 @@ Copy the following JSON to `config.json` in the application's root directory.
```json
{
"gh_server": "github.com",
- "branch": "master",
"temp": "/home/ubuntu/jekyll-hook",
"scripts": {
"build": "./scripts/build.sh",
"publish": "./scripts/publish.sh"
},
"email": {
- "user": "",
- "password": "",
- "host": "",
- "ssl": true
- }
+ "user": "",
+ "password": "",
+ "host": "",
+ "ssl": true
+ },
+ "accounts": [
+ "developmentseed",
+ "mapbox"
+ ]
}
```
Configuration attributes:
- `gh_server` The GitHub server from which to pull code
-- `branch` The branch to watch for changes
- `temp` A directory to store code and site files
- `scripts`
- `build` A script to run to build the site
@@ -43,7 +47,7 @@ Configuration attributes:
- `password` Sending email account's password
- `host` SMTP host for sending email account (e.g. `smtp.gmail.com`)
- `ssl` `true` or `false` for SSL
-
+- `accounts` An array of accounts or organizations whose repositories can be used with this server
## Usage
- run as executable: `$ ./jekyll-hook.js`
@@ -74,6 +78,8 @@ server {
Replace this script with whatever you need for your particular hosting environment.
+You probably want to configure your server to only respond POST requests from GitHub's public IP addresses, found on the webhooks settings page.
+
## Dependencies
Here's a sample script to install the approriate dependencies on an Ubunutu server: