Skip to content
mattdodge edited this page Dec 29, 2014 · 2 revisions

Here are some cool examples of how to use sink.

Keeping your GitHub pages up to date on another domain

GitHub pages is pretty sweet - it allows you to provide nice, readable documentation about your repository to others. The way they do this (at least for a project page) is by adding a gh-pages branch to your repository. Whatever is in that branch will be rendered at your GitHub pages URL.

A lot of people wonder about using a custom domain for this URL though. While GitHub has provided some resources to help out, sink makes it pretty easy! Here is the actual sink config I use to keep http://mattdodge.net/sink up to date with http://mattdodge.github.io/sink :

[sink github pages]
    GITHUB_ACCOUNT = mattdodge
    GITHUB_REPO = sink
    GITHUB_BRANCH = gh-pages
    DIRECTORY = "/home/mattdodge/www/sink"

Now, assuming I have a webhook pointing to that web server, whenever I update gh-pages it updates both on my personal site as well as my GitHub pages site


Keeping sink in sink

I love eating dog food. Especially when it's my own. I have sink deployed on several different servers and, naturally, when I update it I want to see those updates on those servers.

Sink to the rescue! I just add webhooks from the sink repository to my sink installs and add this as a sink config:

[sink my sink]
    GITHUB_ACCOUNT = mattdodge
    GITHUB_REPO = sink
    GITHUB_BRANCH = master
    DIRECTORY = "."

It will listen for changes on sink/master and update the sink directory (. for current directory) when they are pushed. Pretty convenient!

Obviously, as the maintainer of sink with access to the webhooks, I have a little bit of an advantage here. I don't mind sharing the wealth though. Until I can think of a better system, let me know (or even better, give me a shout out on Twitter) and let me know your sink URL, and I'll gladly add a webhook on the repository to it.

Clone this wiki locally