-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
26 lines (21 loc) · 736 Bytes
/
gulpfile.js
File metadata and controls
26 lines (21 loc) · 736 Bytes
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
var gulp = require('gulp'),
git = require('gulp-git'),
rimraf = require('rimraf');
gulp.task('clean', function (done) {
rimraf('./_site/.git', done);
});
gulp.task('init-git', ['clean'], function (done) {
process.chdir('./_site');
git.init(done);
});
gulp.task('add-remote', ['init-git'], function (done) {
git.addRemote('origin', 'https://github.com/khirakawa/khirakawa.github.com.git', done);
});
gulp.task('commit-site', ['init-git'], function () {
return gulp.src('./*')
.pipe(git.add())
.pipe(git.commit('init'));
});
gulp.task('deploy', ['clean', 'init-git', 'add-remote', 'commit-site'], function (done) {
git.push('origin', 'master:master', {args: " -f"}, done);
});