travis_push_doc.sh 738 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. set -ev
  3. # The encrypted key is not available in pull requests from forks
  4. if [ -z "$GITAUTH" ]; then
  5. exit 0
  6. fi
  7. git clone --depth=5 -b gh-pages https://$GITAUTH@github.com/open62541/open62541-www
  8. cd open62541-www
  9. rm -r -f ./doc/current/* || true # ignore result
  10. cp -r ../../doc/* ./doc/current/
  11. cp -r ../../doc_latex/open62541.pdf ./doc/open62541-current.pdf
  12. git add -A ./doc
  13. git config --global user.email "open62541-travis-ci@users.noreply.github.com"
  14. git config --global user.name "Open62541 travis-ci"
  15. git config --global push.default simple
  16. git commit -am "updated generated documentation on webpage by travis-ci [ci skip]"
  17. git push https://$GITAUTH@github.com/open62541/open62541-www
  18. cd .. && rm -rf open62541-www