GitHub Integration

published Apr 10, 2014

We’ve been working on GitHub integration for quite a while now, and I’m happy to announce that it is ready to use.

To start, go to and follow the instructions. If you do that, you can ignore the rest of this email, but here’s a quick set of steps to illustrate how it works:

First, create a repository on GitHub and add leanpub ( as a collaborator.

Create a manuscript directory in your repository and put the content from your current Leanpub manuscript folder in it.

Second, go to

Select “Use Git and GitHub” and enter the path to your book’s repository on GitHub. E.g. if your repository is at

then you would enter


Now you can push to GitHub and we’ll pull from you before generating your book.

If you were using Dropbox before, your dropbox folder will still be on your computer, but we won’t be using it for anything. You can safely delete it once you have moved everything to GitHub.

You may also be interested in setting up a post-commit hook. This uses the Leanpub API ( and a GitHub service hook to preview your book every time you push to Leanpub.

First, you’ll need your Leanpub API key, which you can get at

Now, set-up your Leanpub webhook.

Go to your repository’s webhooks page. Click on the “Configure Services” button and look for Leanpub in the list of services. Enter your API key and your book’s slug. Make the Webhook active, and click on “Update Settings”.

We’ll be making improvements to our Git and GitHub integration as we get feedback from you, our authors, so please let us know what you think.



P.S. Special thanks to Nicholas Zakas ( for helping us beta test this feature!

blog comments powered by Disqus