deploy-docs 446 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. set -ex
  3. script/build-docs
  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