Ember CLI Deploy

2.0.0 · active · verified Wed Apr 22

Ember CLI Deploy provides a flexible, plugin-based deployment pipeline specifically designed for Ember CLI applications. It integrates directly with the Ember CLI ecosystem, allowing developers to define complex deployment strategies through a configuration-driven approach. The current stable version is 2.0.0. While not following a strict time-based release cadence, it sees regular updates for bug fixes and new features, with major versions introducing significant changes like Node.js version compatibility shifts or configuration overhauls. Its key differentiator is its deep integration with Ember CLI projects and its extensible plugin architecture, which enables deployment to various targets (e.g., S3, FastBoot, gh-pages) with custom hooks and asset handling, making it a tailored solution for Ember applications rather than a general-purpose deployment tool.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to install `ember-cli-deploy` and a basic build plugin, sets up a minimal `config/deploy.js` file, and shows the primary command for initiating a deployment within an Ember CLI project context.

import { execSync } from 'node:child_process';
import { writeFileSync } from 'node:fs';
import { resolve } from 'node:path';

// 1. Install ember-cli-deploy (usually done in your Ember CLI project)
console.log('Installing ember-cli-deploy...');
execSync('ember install ember-cli-deploy', { stdio: 'inherit' });

// 2. Install a common deployment plugin (e.g., ember-cli-deploy-build)
console.log('Installing ember-cli-deploy-build...');
execSync('ember install ember-cli-deploy-build', { stdio: 'inherit' });

// 3. Create a basic deploy configuration file (config/deploy.js)
const deployConfigFileContent = `
module.exports = function(environment) {
  let ENV = {
    build: {
      environment: environment
    },
    // Add other plugins and their configurations here
    // For example, for S3 deployment:
    // s3: {
    //   accessKeyId: process.env.AWS_ACCESS_KEY_ID ?? '',
    //   secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY ?? '',
    //   bucket: 'my-ember-app-bucket',
    //   region: 'us-east-1'
    // }
  };

  return ENV;
};
`;

const configPath = resolve(process.cwd(), 'config', 'deploy.js');
writeFileSync(configPath, deployConfigFileContent);
console.log(`Created dummy config/deploy.js at ${configPath}`);

// 4. Run the deploy command (requires an actual Ember CLI project context)
console.log('To deploy, navigate to your Ember CLI project and run:');
console.log('  ember deploy --environment=production');
console.log('Make sure you have appropriate plugins installed and configured.');

view raw JSON →