Skip to content

Commit

Permalink
Setup gitbook for documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tuliren committed May 17, 2019
1 parent 23efea5 commit fc90875
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ lib
target
.idea
**/vendor/bundle
node_modules
_book
3 changes: 3 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Summary

* [Introduction](README.md)
29 changes: 29 additions & 0 deletions bin/publish-gh-pages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh

# install the plugins and build the static site
gitbook install && gitbook build

# checkout to the gh-pages branch
git checkout gh-pages || git checkout -b gh-pages

# pull the latest updates
git pull origin gh-pages --rebase

# copy the static site files into the current directory.
cp -R _book/* .

# remove 'node_modules' and '_book' directory
git clean -fx node_modules
git clean -fx _book

# add all files
git add .

# commit
git commit -a -m "Update docs"

# push to the origin
git push -u origin gh-pages

# checkout to the master branch
git checkout master
14 changes: 14 additions & 0 deletions book.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"plugins": [
"-sharing",
"github",
"anchors",
"splitter"
],

"pluginsConfig": {
"github": {
"url": "https://github.com/LiveRamp/jack"
}
}
}

0 comments on commit fc90875

Please sign in to comment.