Leanpub lets you use webhooks to trigger a preview or a publish event whenever you push to your GitHub or Bitbucket repository.

Here is an article about setting up webhooks if you're using Leanpub's GitHub writing mode for your book:

http://help.leanpub.com/en/articles/5243991-setting-up-webhooks-if-you-re-using-leanpub-s-github-writing-mode-for-your-book

And here is an article about setting up webhooks if you're using Leanpub's Bitbucket writing mode for your book:

http://help.leanpub.com/en/articles/5244024-setting-up-webhooks-if-you-re-using-leanpub-s-bitbucket-writing-mode-for-your-book

Did this answer your question?