I'm trying to use grunt-ssh to deploy my app.
I installed grunt-ssh, everything seems ok.
Here is the grunt :
module.exports = function(grunt){
grunt.initConfig({
// don't keep passwords in source control
secret: grunt.file.readJSON('grunt/ssh.json'),
sshexec: {
uptime: {
command: "uptime",
options: {
host: "<%= secret.host %>",
port: 22,
username: "<%= secret.username %>",
password: "<%= secret.password %>",
path: "<%= secret.path %>"
}
}
},
// our sftp file copy config
sftp: {
deploy: {
files: {
"./": "publish/**"
},
options: {
srcBasePath: "publish/",
createDirectories: true,
showProgress: true
}
}
}
});
grunt.loadNpmTasks('grunt-ssh');
grunt.registerTask('deploy', [
'sshexec:uptime',
'sftp:deploy'
]);
};
After I run grunt deploy
, here is what I've got :
Running "sshexec:uptime" (sshexec) task
Verifying property sshexec.uptime exists in config...ERROR
>> Unable to process task.
Warning: Required config property "sshexec.uptime" missing. Use --force to continue.
Aborted due to warnings.
I got inspired by http://tech.toptable.co.uk/blog/2013/08/08/grunt-your-deployments-too/
Really can't figure this out. Any idea ?
PS : my config : grunt-cli v0.1.13 grunt v0.4.5