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.
build.sh
installs server dependencies for Ubuntu Linux- run
$ npm install
to install app dependencies
Copy the following JSON to config.json
in the application's root directory.
{
"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 codebranch
The branch to watch for changestemp_directory
A directory to store code and site filessite_directory
A directory to publish the siteemail
Optional. Settings for sending email alertsuser
Sending email account's user name (e.g.example@gmail.com
)password
Sending email account's passwordhost
SMTP host for sending email account (e.g.smtp.gmail.com
)ssl
true
orfalse
for SSL
- run once:
$ node app.js
- use forever to run as server:
$ forever app.js
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.