Skip to content

Instantly share code, notes, and snippets.

@FutoRicky
Forked from chrislopresto/deploy-gh-pages.sh
Created June 22, 2016 05:10
Show Gist options
  • Save FutoRicky/94b0b64408104b6c394b7f021592aa0d to your computer and use it in GitHub Desktop.
Save FutoRicky/94b0b64408104b6c394b7f021592aa0d to your computer and use it in GitHub Desktop.
Deploy Ember App to GitHub Pages
#!/usr/bin/env bash
git checkout master
git pull
rm -rf dist
ember build --environment production
git checkout gh-pages
git pull
ls -1 | grep -v -E '^dist|CNAME|circle.yml$' | xargs rm -rf
mv dist/* ./
mv dist/.* ./
rmdir dist
git add -A
git commit -am "Update"
git push
git checkout master
git pull
git reset --hard HEAD
rm -rf node_modules bower_components dist tmp
npm install && bower install
git reset --hard HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment