diff --git a/package.json b/package.json index 1b8b84900..a3d1745cd 100644 --- a/package.json +++ b/package.json @@ -39,13 +39,13 @@ "eslint-config-standard": "^6.2.1", "eslint-plugin-promise": "^3.4.0", "eslint-plugin-standard": "^2.0.1", - "gh-pages": "^0.12.0", "gulp": "^3.9.1", "gulp-bump": "^2.5.1", "gulp-conventional-changelog": "^1.1.0", "gulp-documentation": "^3.1.0", "gulp-eslint": "^3.0.1", "gulp-filter": "^4.0.0", + "gulp-gh-pages": "^0.5.4", "gulp-git": "^1.12.0", "gulp-mocha": "^3.0.1", "gulp-rename": "^1.2.2", @@ -97,4 +97,4 @@ "greenkeeperio-bot ", "npmcdn-to-unpkg-bot " ] -} \ No newline at end of file +} diff --git a/tasks/docs/publish.js b/tasks/docs/publish.js index 8b13f03ff..ed1226c17 100644 --- a/tasks/docs/publish.js +++ b/tasks/docs/publish.js @@ -1,16 +1,15 @@ 'use strict' const join = require('path').join -const ghPages = require('gh-pages') -const util = require('gulp-util') +const os = require('os') +const pkg = require('../../config/user').pkg module.exports = (gulp) => { - gulp.task('docs:publish', ['docs:build'], (cb) => { - ghPages.publish(join(process.cwd(), 'docs'), { - message: 'docs: auto build', - logger (msg) { - util.log(`'${util.colors.cyan('docs:publish')}' ${msg}`) - } - }, cb) + gulp.task('docs:publish', ['docs:build'], () => { + const ghPages = require('gulp-gh-pages') + return gulp.src('./docs/**/*', {cwd: process.cwd()}) + .pipe(ghPages({ + cacheDir: join(os.tmpdir(), 'aegir-gh-pages-cache', pkg.name) + })) }) }