GitBook integrates perfectly with GitHub as a host for your book's source.
Before integrating your book with GitHub, you need to authorize GitBook to get access to your GitHub account.
In your account settings, connect your GitHub account with the correct permissions:
Webhooks notify GitBook when your GitHub repository changes.
If your GitHub changes are not available on GitBook, the main source of the problem is the webhook. You can check the state of your webhook in your repository's settings.
When your GitHub account is correctly linked to your GitBook account, linking a book to a repository is easy.
Caution: When you specify a GitHub repository in your book's settings, it will take priority over GitBook's git repository, this means that the editor will directly edit content on GitHub.
The sync is unidirectional, only changes made on GitHub will trigger builds on GitBook, GitBook will not update your GitHub repository with any content written before.
YourGitHubUserName/RepoName
)You can now edit your GitHub repository from the web editor (if you have authorized the correct permissions), and your commit on GitHub will trigger builds on GitBook
If you linked your GitHub repository to a GitBook but editing content doesn't trigger any build. Verify that the webhook has been correctly added to your GitHub repository (in your GitHub repository settings -> Webhook). If the webhook is not present or invalid, add it back from your book's settings.
If you transferred your book to a new owner, the webhook is now invalid, you need to add it back.