Deploying Ember Apps based on the Ember Template to Github Pages
- Make sure that everything is named consistently (i.e.
ember-template
->ember-deployment-example
) - If you haven't already, run
npm install
andbower install
- Update
config/environment.js
as follows:
if (environment === 'production') {
ENV.baseURL = '/ember-deployment-example/';
ENV.locationType = 'hash';
}
- Create a
gh-pages
branch locally and check it out. - Remove
dist
from .gitignore and commit. - Run
ember build --environment=production
, adddist
, and commit. - Use "subtree push" to create a new
gh-pages
branch on GitHub composed only of thedist
directory. (Taken from https://gist.github.com/cobyism/4730490)
git subtree push --prefix dist origin gh-pages