From a9548a48d5cc3c328c7ca42cc51e53f3799cdea2 Mon Sep 17 00:00:00 2001 From: Dave Cole Date: Wed, 20 Mar 2013 12:47:17 -0400 Subject: First --- readme.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 readme.md (limited to 'readme.md') diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..26a8960 --- /dev/null +++ b/readme.md @@ -0,0 +1,48 @@ +# jekyll-hook + +A server that listens for webhook posts from GitHub, generates a site with Jekyll, and moves it somewhere to be served. Use this to run your own GitHub Pages-style web server. Great for when you need to serve your websites behind a firewall, need extra server-level features like HTTP basic auth (see `default` file for Nginx config with basic auth), or want to host your site directly on a CDN or file host like S3. + +## Installation + +- `build.sh` installs server dependencies for Ubuntu Linux +- run `$ npm install` to install app dependencies + +## Configuration + +Copy the following JSON to `config.json` in the application's root directory. + +```json +{ + "gh_server": "github.com", + "branch": "master", + "temp_directory": "/home/ubuntu/jekyll-hook", + "site_directory": "/usr/share/nginx/www", + "email": { + "user": "", + "password": "", + "host": "", + "ssl": true + } +} +``` + +Configuration attributes: + +- `gh_server` The GitHub server from which to pull code +- `branch` The branch to watch for changes +- `temp_directory` A directory to store code and site files +- `site_directory` A directory to publish the site +- `email` Optional. Settings for sending email alerts + - `user` Sending email account's user name (e.g. `example@gmail.com`) + - `password` Sending email account's password + - `host` SMTP host for sending email account (e.g. `smtp.gmail.com`) + - `ssl` `true` or `false` for SSL + +## Usage + +- run once: `$ node app.js` +- use [forever](https://github.com/nodejitsu/forever) to run as server: `$ forever app.js` + +## Web server + +Serve content from a simple webserver link Nginx (the `default` file is a sample Nginx configuration with HTTP basic auth) or use s3cmd or rsync to mirror files on S3 or a CDN. -- cgit v1.2.3