Skip to content

Instantly share code, notes, and snippets.

@SamuelRiversMoore
Created March 8, 2017 09:17
Show Gist options
  • Save SamuelRiversMoore/0026d46aee766aec1655be453b27d90b to your computer and use it in GitHub Desktop.
Save SamuelRiversMoore/0026d46aee766aec1655be453b27d90b to your computer and use it in GitHub Desktop.
var gutil = require( 'gulp-util' );
var ftp = require( 'vinyl-ftp' );
gulp.task( 'deploy', function () {
var conn = ftp.create( {
host: '****',
user: '****',
password: '****',
parallel: 10,
log: gutil.log
} );
var globs = [
'/*/**',
//'assets/**',
//'site/**',
//'kirby/**',
//'panel/**',
];
return gulp.src( globs, { base: paths.dist, cwd: './dist', buffer: false } )
.pipe( conn.newer( '/public/www/' ) ) // only upload newer files
.pipe( conn.dest( '/public/www/' ) );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment