Created
November 8, 2015 09:15
-
-
Save khanghoang/2cbc13b0d711d80478b1 to your computer and use it in GitHub Desktop.
ShipIt demo config file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (shipit) { | |
require('shipit-deploy')(shipit); | |
shipit.initConfig({ | |
default: { | |
workspace: '../shipit-temp-folder', | |
deployTo: '~/express4-es6', | |
branch: "shipit", | |
repositoryUrl: 'https://github.com/khanghoang/express4-es6.git', | |
ignores: ['.git', 'node_modules'], | |
rsync: ['--del'], | |
keepReleases: 10, | |
key: '~/Documents/Certs/khanghoang.pem', | |
shallowClone: true | |
}, | |
staging: { | |
servers: { | |
host: '54.251.129.55', | |
user: 'ubuntu' | |
} | |
}, | |
}); | |
shipit.blTask('npm', function () { | |
return shipit.remote('cd ~/express4-es6/current/ && npm install'); | |
}); | |
shipit.blTask('installGulp', function () { | |
return shipit.remote('cd ~/express4-es6/current/ && npm install gulp --save && npm install gulp-cli --save'); | |
}); | |
shipit.blTask('babel', function () { | |
return shipit.remote('cd ~/express4-es6/current/ && /opt/node/bin/gulp babel'); | |
}); | |
shipit.on('published', function () { | |
shipit.start(['npm', 'installGulp','babel', 'pm2']); | |
}); | |
shipit.blTask('pm2', function () { | |
return shipit.remote('cd ~/express4-es6/ && pwd && /opt/node/bin/pm2 startOrGracefulReload secret.json'); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment