generate-doc.sh 604 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. # Documentation generation script run by travis
  3. mkdir ../gh-pages
  4. cp docs/conf.json node_modules/jsdoc/
  5. # Generate Doc
  6. grunt jsdoc
  7. # Copy Home Page from Master Branch to Gh-Pages folder
  8. cp -r docs/* ../gh-pages/
  9. cd ../gh-pages
  10. # Set identity
  11. git config --global user.email "travis@travis-ci.org"
  12. git config --global user.name "Travis"
  13. # Add branch
  14. git init
  15. git remote add origin https://${GH_TOKEN}@github.com/paypal/PayPal-node-SDK.git > /dev/null
  16. git checkout -B gh-pages
  17. # Push generated files
  18. git add .
  19. git commit -m "Documentation updated"
  20. git push origin gh-pages -fq > /dev/null