deploy-docs 428 B

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