Skip to content

Instantly share code, notes, and snippets.

@reymon359
Forked from nicobytes/deploy-gh.sh
Created June 1, 2019 21:44
Show Gist options
  • Save reymon359/5c3a85799713465cd40bf00153c96d66 to your computer and use it in GitHub Desktop.
Save reymon359/5c3a85799713465cd40bf00153c96d66 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