Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #74 from fourkitchens/pages-fix
Browse files Browse the repository at this point in the history
Github Pages deployment fix
  • Loading branch information
Evan Willhite authored Mar 5, 2018
2 parents 2a5f34f + d055ad4 commit 08c8779
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
20 changes: 12 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = (gulp, config) => {
const svgSprite = require('gulp-svg-sprite');

// deploy
const ghPages = require('gulp-gh-pages');
const ghpages = require('gh-pages');

const tasks = {
compile: [],
Expand Down Expand Up @@ -150,12 +150,16 @@ module.exports = (gulp, config) => {
/**
* Deploy
*/
// eslint-disable-next-line func-names, prefer-arrow-callback
gulp.task('ghpages-deploy', function () {
return gulp.src([
`${config.paths.dist_js}/**/*`,
`${config.paths.pattern_lab}/**/*`,
], { base: config.themeDir })
.pipe(ghPages());
gulp.task('ghpages-deploy', () => {
// Create build directory.
gulp.src([`${config.paths.dist_js}/**/*`, `${config.paths.pattern_lab}/**/*`], { base: config.themeDir }).pipe(gulp.dest('build'));
// Publish the build directory to github pages.
ghpages.publish(`${config.themeDir}build`, (err) => {
if (err === undefined) {
console.log('Successfully deployed!');
} else {
console.log(err);
}
});
});
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"browser-sync": "^2.11.0",
"del": "^3.0.0",
"eslint": "^4.3.0",
"gh-pages": "^1.1.0",
"glob": "^7.0.3",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^4.0.0",
Expand All @@ -21,7 +22,6 @@
"gulp-clean-css": "^3.7.0",
"gulp-concat": "^2.6.0",
"gulp-flatten": "^0.3.1",
"gulp-gh-pages": "^0.5.4",
"gulp-help": "^1.6.1",
"gulp-if": "^2.0.1",
"gulp-imagemin": "^3.3.0",
Expand Down

0 comments on commit 08c8779

Please sign in to comment.