deploy-docs 435 B

1234567891011121314151617181920212223242526272829
  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]:docker/fig.git
  12. fi
  13. git fetch origin
  14. git reset --soft origin/gh-pages
  15. echo ".git-gh-pages" > .gitignore
  16. git add -A .
  17. git commit -m "update" || echo "didn't commit"
  18. git push origin master:gh-pages
  19. popd