How to integrate GitBook with GitHub?

How to integrate GitBook with GitHub?

  1. Create a new repo on Github, for example: my-gitbook-test
  2. Clone this repo:
    git clone https://github.com/feici02/my-gitbook-test.git
    
  3. Create a new book with GitBook command line tool:
    cd my-gitbook-test
    gitbook init
    
  4. Make some changes to this book, for example: add 2 chapters.
  5. When your changes are done, you can preview your book locally.
    gitbook serve
    
  6. Copy a .gitignore file from other GitBooks.
  7. If you are satisfied with the book, check in these changes.
    git status
    git add -A
    git commit -m "initial commit"
    
  8. Push your repo to Github.
    git push -u origin master
    
  9. Now, you can view this book on GitHub.
  10. On GitBook, configure the integration with GitHub in Account Settings - GitHub.
  11. On GitHub, Settings - Installed integrations - GitBook Configure, you can specify your repos that can be accessed by GitBook.
  12. Create on new book on GitBook by importing from Github.
  13. If the integration is setup correctly, when you push new changes to the GitHub repo, your GitBook will be updated automatically.

results for ""

    No results matching ""