Skip to content

Instantly share code, notes, and snippets.

@nicobytes
Last active August 3, 2020 20:14
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save nicobytes/8c7c0a2139af48b9fc217d107d7e7cc0 to your computer and use it in GitHub Desktop.
Save nicobytes/8c7c0a2139af48b9fc217d107d7e7cc0 to your computer and use it in GitHub Desktop.
Deploy gh-pages ionic pwa
#!/bin/bash
git branch -D gh-pages
git push origin --delete gh-pages
git checkout -b gh-pages
ionic build --prod
find . -type d ! -path './www*' ! -path './.git*' ! -path '.' | xargs rm -rf
rm -r *.*
mv www/* .
rm -rf www
git add .
git commit -m "Publishing to github pages"
git push origin gh-pages
git checkout master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment