Skip to content

Commit 1ef317d

Browse files
committed
Setup deploy pipeline for development and production
1 parent 2742f5a commit 1ef317d

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

config/deploy.js

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* eslint-env node */
2+
'use strict';
3+
4+
module.exports = function(deployTarget) {
5+
//see https://github.com/ember-cli-deploy/ember-cli-deploy-revision-data/issues/52
6+
process.env.GIT_DISCOVERY_ACROSS_FILESYSTEM=1;
7+
let ENV = {
8+
build: {
9+
environment: 'development'
10+
},
11+
'ssh-index': { // copy and deploy index.html
12+
username: 'root',
13+
host: 'semantic.works',
14+
port: 22,
15+
// remoteDir:
16+
allowOverwrite: true,
17+
agent: process.env.SSH_AUTH_SOCK
18+
},
19+
'rsync': { // copy assets
20+
21+
port: 22,
22+
// dest: '/data/app-semantic-works/frontend-semantic-works',
23+
delete: false,
24+
arg:['--verbose']
25+
}
26+
};
27+
28+
if (deployTarget === 'development' || deployTarget === 'dev') {
29+
ENV['ssh-index']["remoteDir"] = "/data/app-semantic-works-dev/frontend-semantic-works",
30+
ENV['rsync']['dest'] = ENV['ssh-index']['remoteDir'];
31+
}
32+
33+
if (deployTarget === 'production') {
34+
ENV.build.environment = "production";
35+
ENV['ssh-index']["remoteDir"] = "/data/app-semantic-works/frontend-semantic-works",
36+
ENV['rsync']['dest'] = ENV['ssh-index']['remoteDir'];
37+
}
38+
39+
// Note: if you need to build some configuration asynchronously, you can return
40+
// a promise that resolves with the ENV object instead of returning the
41+
// ENV object synchronously.
42+
return ENV;
43+
};

package.json

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
"ember-cli-app-version": "^3.2.0",
2828
"ember-cli-babel": "^7.13.0",
2929
"ember-cli-dependency-checker": "^3.2.0",
30+
"ember-cli-deploy": "^1.0.2",
31+
"ember-cli-deploy-build": "^2.0.0",
32+
"ember-cli-deploy-display-revisions": "^2.0.0",
33+
"ember-cli-deploy-revision-data": "^1.0.0",
34+
"ember-cli-deploy-rsync": "0.0.5",
35+
"ember-cli-deploy-ssh-index": "^1.0.0",
3036
"ember-cli-eslint": "^5.1.0",
3137
"ember-cli-htmlbars": "^4.2.0",
3238
"ember-cli-inject-live-reload": "^2.0.1",

0 commit comments

Comments
 (0)