Skip to content

Commit

Permalink
fix(docs): use different module for publishing to gh-pages
Browse files Browse the repository at this point in the history
fixes #79
  • Loading branch information
dignifiedquire committed Dec 9, 2016
1 parent 5d5e183 commit 601525f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -97,4 +97,4 @@
"greenkeeperio-bot <[email protected]>",
"npmcdn-to-unpkg-bot <[email protected]>"
]
}
}
17 changes: 8 additions & 9 deletions tasks/docs/publish.js
Original file line number Diff line number Diff line change
@@ -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)
}))
})
}

0 comments on commit 601525f

Please sign in to comment.