Use this guide to deploy Ember apps based on our Ember Template to GitHub Pages.
By the end of this, developers should be able to:
- Deploy an Ember app 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';
}
- Make sure all work is committed and working on your
master
branch. - Create a
gh-pages
branch locally and check it out. Mergemaster
intogh-pages
. - Remove
/dist
from.gitignore
, add and commit. - Run
ember build --environment=production
. git add /dist
and commit.- Use "subtree push" to create a new gh-pages branch on GitHub composed only of the dist directory using:
git subtree push --prefix dist origin gh-pages
(Taken from https://gist.github.com/cobyism/4730490)
Source code distributed under the MIT license. Text and other assets copyright General Assembly, Inc., all rights reserved.