Deploying Glimmer Apps
While playing around with the newly released Glimmer, I wanted to deploy my demo application so others could poke around with it.
In order to facilitate shared solutions between Ember and Glimmer, the Glimmer application structure utilizes the same tooling that full blown Ember apps use, this means that we can leverage Ember CLI, ember-cli-deploy and ember-cli-deploy-git to make this a breeze.
Note: These steps are exactly the same for deploying an Ember app. ☺️
Setup 👣
Setting up deployment to gh-pages is pretty simple.
- Install the underlying packages:
ember install ember-cli-deploy
ember install ember-cli-deploy-build
ember install ember-cli-deploy-git
- Update your
config/deploy.js
configuration to add thegit
key:
ENV.git = {
repo: 'git@github.com:username/repo.git',
branch: 'gh-pages',
worktreePath: '/tmp/deploy'
};
- Initialize your
gh-pages
branch:
git checkout --orphan gh-pages
git rm -rf .
git commit --allow-empty --message="Initial commit"
Deployment 🚀
Once the setup is complete, you can deploy via:
ember deploy production
Profit 💸
Thanks to the awesome ember-cli-deploy ecosystem, we can all deploy Ember and Glimmer apps with ease! 🎉