var gulp = require('gulp');
var minifyHtml = require('gulp-minify-html');
var cleanCSS = require('gulp-clean-css');
var usemin = require('gulp-usemin');
var rev = require('gulp-rev');
var ghPages = require('gulp-gh-pages');
var ghPagesConfig = {
branch: 'master'
};
gulp.task('build', function () {
return gulp.src('src/index.html')
.pipe(usemin({
css: [ rev() ],
html: [ minifyHtml({ empty: true }) ],
inlinecss: [ cleanCSS, 'concat' ]
}))
.pipe(gulp.dest('dist/'));
});
gulp.task('publish', function() {
return gulp.src('./dist/**/*')
.pipe(ghPages({
branch: 'master'
}));
});
gulp.task('deploy', ['build'], function () {
return gulp.start('publish');
});