forked from krzysztofspilka/JSpreadsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shipitfile.js
53 lines (42 loc) · 1.29 KB
/
shipitfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
var copyObject = require('copy-object');
module.exports = function (shipit) {
require('shipit-deploy')(shipit);
var
config = {
servers: '142.4.202.189',
workspace: '/tmp/jspreadsheets.com',
repositoryUrl: 'https://github.com/krzysztofspilka/staticgen.git',
ignores: ['.git', 'node_modules'],
rsync: ['--force', '--delete', '--delete-excluded', '-I', '--stats', '--chmod=ug=rwX'],
keepReleases: 5,
shallowClone: false
};
shipit.initConfig({
production: (function() {
config = copyObject(config);
config.deployTo = '/home/httpd/jspreadsheets.com';
return config;
}()),
development: (function() {
config = copyObject(config);
config.deployTo = '/home/httpd/dev.jspreadsheets.com';
return config;
}())
});
shipit.task('test', function() {
shipit.remote('pwd');
});
shipit.blTask('deploy', [
'deploy:init',
'deploy:fetch',
'deploy:update'
]);
shipit.on('updated', function() {
var path = shipit.releasePath;
shipit.remote('cd ' + path + ' && bundle install --path=vendor').then(function() {
return shipit.remote('cd ' + path + ' && bundle exec middleman build');
}).then(function() {
shipit.start(['deploy:publish', 'deploy:clean']);
});
});
};