deploy-docs.sh 742 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. set -x
  3. set -o errexit -o nounset
  4. DOCSDIR=build-docs
  5. REVISION=$(git rev-parse --short HEAD)
  6. rm -rf $DOCSDIR || exit
  7. mkdir $DOCSDIR
  8. cd $DOCSDIR
  9. cp ../build/docs/html/* .
  10. #cp ../build/docs/CNAME .
  11. git init
  12. git branch -m main
  13. git config user.name "CI"
  14. git config user.email "[email protected]"
  15. set +x
  16. echo "git remote add upstream \"https://\[email protected]/harfbuzz/harfbuzz.github.io.git\""
  17. git remote add upstream "https://[email protected]/harfbuzz/harfbuzz.github.io.git"
  18. set -x
  19. git fetch upstream
  20. git reset upstream/main
  21. touch .
  22. git add -A .
  23. if [[ $(git status -s) ]]; then
  24. git commit -m "Rebuild docs for https://github.com/harfbuzz/harfbuzz/commit/$REVISION"
  25. git push -q upstream HEAD:main
  26. fi