Skip to content

Instantly share code, notes, and snippets.

@pschfr
Created September 7, 2018 04:21
Show Gist options
  • Save pschfr/eaa721434db0ac9c938d4c28e95123cd to your computer and use it in GitHub Desktop.
Save pschfr/eaa721434db0ac9c938d4c28e95123cd to your computer and use it in GitHub Desktop.
Simple Gulp file to deploy via FTP
var gulp = require('gulp'),
util = require('gulp-util'),
vftp = require('vinyl-ftp');
gulp.task('default', function() {
var conn = vftp.create({
host: 'domain.com',
user: 'username',
pass: 'password',
parallel: 8,
log: util.log
}),
globs = 'www/**';
return gulp.src(globs, { buffer: false })
.pipe(conn.newer('/public_html/subfolder'))
.pipe(conn.dest('/public_html/subfolder'));
});
@pschfr
Copy link
Author

pschfr commented Sep 7, 2018

You have to run npm install gulp gulp-util vinyl-ftp before using this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment