publish_gh_page.sh 697 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. # Prepare files to be published
  3. grunt docs
  4. grunt build:demo
  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/* ./
  11. # Copy demo application
  12. rsync -a ../build/demo/* ./demo
  13. # Commit and push changes
  14. git status
  15. git add *
  16. git commit -m "Pushed auto-generated class documentation and demo for $TRAVIS_TAG"
  17. git tag -a $TRAVIS_TAG -m "Class documentation and demo for $TRAVIS_TAG"
  18. git push origin master --follow-tags
  19. echo "Deployed class documentation and demo for $TRAVIS_TAG successfully."
  20. cd ..
  21. rm -rf opensheetmusicdisplay.github.io