2

Currently I am using "vinyl-ftp" for deployment. But this is not working with SFTP connections. What you guys are using for SFTP connection with Gulp 4?

Zaman
  • 71
  • 2
  • 6

1 Answers1

0

I use gulp-rsync, quite possibly, it will suit you too

  • `function deployTest(){ return gulp .src('/WIP/assets/test/**') .pipe(rsync({ root: 'sftp.abc.com', hostname: 'abc.com', destination: '/assets/test', username: 'xxx', password: 'xxx', archive: true, silent: false, compress: true, progress: true })); console.log("Deploy Started"); }; ` I tried this. Doesn't work. Is it possible to provide any example? Thanks. – Zaman Mar 28 '19 at 02:46
  • ```gulp.task('rsync', function() { return gulp.src('app/**') .pipe(rsync({ root: 'app/', hostname: 'username@yousite.com', destination: 'yousite/public_html/', // include: ['*.htaccess'], // Includes files to deploy exclude: ['**/Thumbs.db', '**/*.DS_Store'], // Excludes files from deploy recursive: true, archive: true, silent: false, compress: true })) });``` – Максим Голев Mar 29 '19 at 20:14
  • unfortunately, that didnt work. How you mention the password? – Zaman Mar 31 '19 at 23:37