Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Bash script to deploy Docbox documentation
cd docs
rm -rf dddocs
rm -rf docs-build
mkdir docs-build
npm install
npm run build
git clone -b gh-pages --single-branch[YOUR ORG]/[YOUR REPOSITORY].git dddocs
yes | cp -rf docs-build/index.html dddocs
yes | cp -rf docs-build/bundle.js dddocs
yes | cp -rf css/* dddocs/css
yes | cp -rf lib/* dddocs/lib
cd dddocs
if [[ $(git diff) ]]; then
echo "Deploying..."
git add .
git commit -m 'Deploy docs'
git push origin gh-pages
echo "Nothing to deploy."
echo "Cleaning up..."
cd ..
rm -rf dddocs
rm -rf docs-build
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.