-
Notifications
You must be signed in to change notification settings - Fork 4
/
gulpfile.js
38 lines (30 loc) · 1.1 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var gulp = require('gulp'),
shell = require('gulp-shell'),
ghPages = require('gulp-gh-pages-gift'),
imagemin = require('gulp-imagemin'),
cp = require('child_process'),
runSequence = require('run-sequence').use(gulp);
gulp.task('image', function () {
return gulp.src('source/images/**/*')
.pipe(imagemin())
.pipe(gulp.dest('_site/images'));
});
gulp.task('scripts', function () {
return gulp.src('source/scripts/**/*')
.pipe(gulp.dest('_site/scripts'));
});
gulp.task('cname', function() {
return gulp.src('source/CNAME')
.pipe(gulp.dest('_site'));
});
gulp.task('static', function() {
return gulp.src('source/static/**/*')
.pipe(gulp.dest('_site'));
});
gulp.task('push-gh-master', shell.task(['git push origin master']));
gulp.task('contentful', shell.task(['bundle exec jekyll contentful --rebuild']));
gulp.task('push-gh-pages', function () {
return gulp.src('_site/**/*')
.pipe(ghPages({ force: true }));
});
gulp.task('deploy', gulp.series('image', 'cname', 'scripts', 'static', 'push-gh-master', 'push-gh-pages'));