Listen for post-commit HTTP requests from a Git repository, pull down that repository, generate a static website from it, sync it up to S3.
- run
$ npm install
- Set a Web hook on your repo (probably on GitHub) that points to your ssg-hook server:
http://example.com:8080/hooks/ssg
Adjust the what's in the scripts
directory to suit your workflow. By default, they generate a Punch site (or whatever's you specify in build.sh
) and publish it to an S3 bucket (specified in publish.sh
).
Configuration attributes:
gh_server
The GitHub server from which to pull codetemp
A directory to store code and site filesscripts
build
A script to run to build the sitepublish
A script to run to publish the site
accounts
An array of accounts or organizations whose repositories can be used with this server
- run as executable:
$ ./ssg-hook.js
Based on jekyll-hook