-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.babel.js
More file actions
29 lines (22 loc) · 826 Bytes
/
Copy pathgulpfile.babel.js
File metadata and controls
29 lines (22 loc) · 826 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
27
28
29
'use strict';
const staticTasks = require('./gulpfile.static')
const serverTasks = require('./gulpfile.server')
const ghpages = require('gh-pages')
const gulp = require('gulp')
const runSequence = require('run-sequence')
const { buildDir } = require('./gulpfile.common')
const staticDir = buildDir + '/static'
// Remove all content inside the server build, except the server build directory itself
// Publish to Github
gulp.task('gh-pages', function () {
return ghpages.publish(staticDir, function(err) {
console.error(err)
})
})
// Clean both the server build and the static build
gulp.task('clean', ['server:clean', 'static:clean'])
// Publish the static build to GitHub Pages
gulp.task('publish', function(callback) {
runSequence('build', 'gh-pages', callback)
})
gulp.task('default', ['serve'])