-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docs): use different module for publishing to gh-pages
fixes #79
- Loading branch information
1 parent
5d5e183
commit 601525f
Showing
2 changed files
with
10 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <[email protected]>", | ||
"npmcdn-to-unpkg-bot <[email protected]>" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
})) | ||
}) | ||
} |