publish_gh_page.sh 775 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. # Prepare files to be published
  3. npm run build:doc
  4. npm run docs
  5. # Clone github page
  6. git clone git@github.com:opensheetmusicdisplay/opensheetmusicdisplay.github.io.git
  7. cd opensheetmusicdisplay.github.io
  8. git status
  9. # Copy class documentation
  10. rsync -a ../build/docs/* ./classdoc/
  11. # Copy demo application
  12. rsync -a ../build/demo.min.js ./demo/
  13. rm -rf ./demo/sheets
  14. rsync -a ../test/data/* ./demo/sheets/
  15. # Commit and push changes
  16. git status
  17. git add *
  18. git commit -m "Pushed auto-generated class documentation and demo for $TRAVIS_TAG"
  19. git tag -a $TRAVIS_TAG -m "Class documentation and demo for $TRAVIS_TAG"
  20. git push origin master --follow-tags
  21. echo "Deployed class documentation and demo for $TRAVIS_TAG successfully."
  22. cd ..
  23. rm -rf opensheetmusicdisplay.github.io