Add the publishing script so we can publish the docs to github pages on the enterprise server

This commit is contained in:
Abe Levitan committed 2019-09-04 16:37:30 -04:00
1 parent e80bf05f25
commit 5b521da557
1 file changed
+34
Executable
+34
View File
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# switch branches and make sure we've got the latest version
git checkout gh-pages
git pull origin gh-pages
# go to master for the latest docs from master
git checkout master
git pull origin master
# build the docs
make clean
make html
cd ..
# switch back to gh-pages
git checkout gh-pages
# delete everything non-relevant and extract docs
ls | grep -v docs | xargs rm -r
touch .nojekyll
mv ./docs/build/html/* ./
rm -rf ./docs
# And commit to publish
git add -A
git commit -m "publishing updated docs..."
git push origin gh-pages
# switch back to master
git checkout master
# go back to docs dir
cd docs