Mailspring/packages/nylas-mail/script/publish-docs
2017-02-16 13:15:10 -08:00

19 lines
442 B
Bash
Executable file

#!/bin/bash
set -e
# Builds docs and moves the output to gh-pages branch (overwrites)
mkdir -p _docs_output
script/grunt docs
./node_modules/.bin/gitbook --gitbook=latest build . ./_docs_output --log=debug --debug
rm -r docs_src/classes
git checkout gh-pages --quiet
cp -rf _docs_output/* .
# rm -r _docs_output
git add .
git status -s
printf "\nDocs updated! \n\n"
git commit -m 'Update Docs'
git push origin gh-pages
git checkout master