Skip to content

Instantly share code, notes, and snippets.

@chrislopresto
Created April 22, 2015 01:50
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chrislopresto/726e4a3c263f1cb4e040 to your computer and use it in GitHub Desktop.
Save chrislopresto/726e4a3c263f1cb4e040 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