Guest User

Untitled

a guest
Dec 10th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. # File: scripts/publish-gh-pages.sh
  3.  
  4. # Get the full path to the script
  5. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
  6.  
  7. # Go to the project root
  8. cd "${DIR}"/..
  9.  
  10. # Build the static files
  11. npm run build
  12.  
  13. # Assuming the static files are located in ./dist
  14. cd dist/
  15. git init .
  16.  
  17. # Commmit all static files
  18. git add .
  19. git commit -m 'gh-pages'
  20.  
  21. # Publish to github as a singleton commit (--force)
  22. git remote add origin git@github.com:SnakeBytesTech/SnakeBytesTech.github.io.git
  23. git push origin master:gh-pages --force
  24.  
  25. # WARNING: this will overwrite the gh-pages branch. Change it to whatever you want
Add Comment
Please, Sign In to add comment