GitHub-aware website builder
Skynet builds and deploys web sites on your VPS or bare metal server. It is triggered by the post-receive hook.
- Static. Copies the entire repository to the specified destination and then removes the destination .git folder
- Jekyll. Run jekyll on your repository. Entirely controlled by
site's
_config.yml
- Install Skynet:
$ gem install skynet-deploy - Install basic config file:
$ skynet config <first project name> - edit config file to add your repositories
- Run builder by hand to ensure everything works:
$ skynet build - Add
http://YOUR_SKYNET_SERVER/PROJECT_NAMEas a Webhook Payload URL to your repository underSettings -> Webhooks & Services. Chooseapplication/vnd.github.v3+formas the Payload version. - Start server:
$ skynet server
urlValue passed from post-receive hook to verify that the deploy should happentypeThe builder type to invoke for this application- Either
branchanddestinationtogether or onlybranchesmust be specified
keySSH private key file to be used to clone and pull from private repositories. Should be given as an absolute pathrepositoryThe location to clone the repository from. This is usually inferred fromurl, but can be overridden herebranchThe branch to be deployeddestinationAbsolute path to the deployed applicationbranchesFor when multiple branches should be deployed to this machine (such as a production + staging strategy).branchesis a hash with keys being the branch name and values being the destination
Add this to your .git/hooks/post-receive file to use Skynet with
a git server other than GitHub.
read oldrev newrev refname
curl -d "payload={\"repository\":{\"url\":\"<<same path as in config.yml>>\"},\"before\":\"$oldrev\",\"after\":\"$newrev\",\"ref\":\"$refname\"}" http://YOUR_SKYNET_SERVER/PROJECT_NAME
The URL must be visible from the Skynet server, as it will pull a new copy of the repository from this server.