diff --git a/gulpfile.js b/gulpfile.js index 3b0ec4e..489b186 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -19,9 +19,7 @@ var onError = function(error) { } var src = 'src/', - dist = 'dist/', - s3bucket = 'kretschmann.io', - s3region = 'eu-west-1'; + dist = 'dist/'; // // clean everything @@ -127,26 +125,17 @@ gulp.task('watch', function () { // -// S3 Deployment +// rsync Deployment // -gulp.task('s3', function() { - - var publisher = $.awspublish.create({ - params: { 'Bucket': s3bucket }, 'region': s3region - }); - - // define custom headers - var headers = { - 'Cache-Control': 'max-age=315360000, no-transform, public', - 'x-amz-acl': 'public-read' - }; - - return gulp.src(dist + '**/*') - .pipe($.awspublish.gzip({ ext: '' })) // gzip all the things - .pipe(parallelize(publisher.publish(), 10)) - .pipe(publisher.sync()) // delete files in bucket that are not in local folder - .pipe(publisher.cache()) - .pipe($.awspublish.reporter({ states: ['create', 'update', 'delete'] })); +gulp.task('deploy', function() { + return gulp.src(dist) + .pipe($.rsync({ + root: dist, + hostname: 'kretschmann', + destination: '/var/www/kretschmann.io/html', + recursive: true, + clean: true + })); }); @@ -174,15 +163,3 @@ gulp.task('build', function (callback) { callback ); }); - - -// -// gulp deploy: Deployment with fresh production build -// -gulp.task('deploy', function (callback) { - runSequence( - 'build', - 's3', - callback - ); -}); diff --git a/package.json b/package.json index 4b22b90..e69f36f 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "gulp-rename": ">=1.2.2", "gulp-rev": ">=4.0.0", "gulp-rev-replace": ">=0.4.1", + "gulp-rsync": "0.0.5", "run-sequence": ">=1.1.0" }, "scripts": {