deploy-docs 447 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. script/build-docs
  3. set -ex
  4. pushd docs/_site
  5. export GIT_DIR=.git-gh-pages
  6. export GIT_WORK_TREE=.
  7. if [ ! -d "$GIT_DIR" ]; then
  8. git init
  9. fi
  10. if !(git remote | grep origin); then
  11. git remote add origin [email protected]:orchardup/fig.git
  12. fi
  13. git fetch origin
  14. git reset --soft origin/gh-pages
  15. echo ".git-gh-pages" > .gitignore
  16. git add -u
  17. git add .
  18. git commit -m "update" || echo "didn't commit"
  19. git push origin master:gh-pages
  20. popd