Question

I try to use grunt-ssh for deployment. But I get only the files of the folder copied:

sftp: {
  deploy: {
    files: {
      "./": "doc/*"
    },
    options: {
      path: '<%= pkg.server.path %>',
      host: '<%= pkg.server.host %>',
      username: '<%= pkg.server.user %>',
      password: '<%= pkg.server.password %>',
      showProgress: true,
      srcBasePath: 'doc/'
    }
  }
}

How can I get the whole local folder including its subfolders (recursively) doc copied to the remote?

Was it helpful?

Solution

Taking a quick look into the sources solved my problem:

sftp: {
  deploy: {
    files: {
      "./": "doc/**"
    },
    options: {
      path: '<%= pkg.server.path %>',
      host: '<%= pkg.server.host %>',
      username: '<%= pkg.server.user %>',
      password: '<%= pkg.server.password %>',
      showProgress: true,
      srcBasePath: 'doc/',
      createDirectories: true
    }
  }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top