Laravel-Myanmar/docs — pull request #41 by emoosx (2014-06-27 04:40:20+00:00)
Title: Automate grunt workflow to update gitbook at gh-pages branch

Need to install `gitbook` and `grunt-cli` via `npm`.

```
npm install -g grunt-cli
npm install -g gitbook
```
Then `cd` into the directory and call `npm install` to install other dependencies. Now `gitbook build . --output=./_book` will build the book and `grunt gh-pages` or just `grunt` will update the `gh-pages` branch.

However, you still need to call `gitbook build . --output=./_book` and `grunt` manually every time you want to update. But this could be automated by creating a `post-commit` hook in your `.git/hooks/post-commit`.

```sh
#!/bin/sh

gitbook build . --output=./book # build gitbook in ./book directory
grunt
```
If everything works, the gitbook version of the docs would be available at http://Laravel-Myanmar.github.io/docs
Let me know if you need any help.

P.S:: you probably would have to clean your current `gh-pages` branch first.