-
Notifications
You must be signed in to change notification settings - Fork 1
/
shipitfile.js
39 lines (34 loc) · 1.05 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
module.exports = function (shipit) {
require('shipit-deploy')(shipit);
chalk = require('chalk');
shipit.initConfig({
default: {
workspace: '/tmp/shipit-coolepochcountdown',
deployTo: '/srv/users/serverpilot/apps/coolepochcountdown',
repositoryUrl: '[email protected]:chrisroweltd/coolepochcountdown.git',
branch: 'master',
ignores: ['.git', 'node_modules'],
keepReleases: 2,
deleteOnRollback: false,
shallowClone: false,
},
staging: {
servers: 'serverpilot@rex',
}
});
shipit.task('uptime', function () {
return shipit.remote('uptime');
});
shipit.task('symlink:public', function() {
return shipit.remote('cd ' + shipit.config.deployTo + ' && ln -nfs current/public public')
.then(function () {
shipit.log(chalk.green('Current /public symlinked to root /public.'));
});
});
shipit.on('published', function() {
return shipit.remote('cd ' + shipit.config.deployTo + ' && ln -nfs current/public public')
.then(function () {
shipit.log(chalk.green('Current /public symlinked to root /public.'));
});
});
};