Skip to content

Commit

Permalink
Merge pull request #391 from wpmudev/SUI-274
Browse files Browse the repository at this point in the history
fix(gulp): Not publishing to Github when release.
  • Loading branch information
iamleigh authored Dec 15, 2021
2 parents 8160225 + f65333b commit 0248349
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ node_modules
.vscode
.DS_Store
.idea/
*.orig
*.orig
.publish
33 changes: 15 additions & 18 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

// Import `src` and `dest` from gulp for use in the task.
const { src, dest } = require( 'gulp' );
const { src, dest, task } = require( 'gulp' );

/**
* Supported Packages
Expand All @@ -22,7 +22,7 @@ const replace = require( 'gulp-replace' );
const sass = require( 'gulp-sass' )( require( 'sass' ) );
const uglify = require( 'gulp-uglify-es' ).default;
const babel = require( 'gulp-babel' );
const ghpages = require( 'gh-pages' );
const ghPages = require('gulp-gh-pages');

/**
* WPMU DEV Banner
Expand Down Expand Up @@ -418,28 +418,26 @@ function copyComponents() {
*/

// Release library.
function publishLibrary() {

return ghpages.publish( '_dist/library/', {
task(
'publishLibrary',
() => src( './_dist/library/**/**/*' ).pipe( ghPages({
remoteUrl: 'https://github.com/wpmudev/shared-ui.git',
branch: 'master',
repo: 'https://github.com/wpmudev/shared-ui.git',
dest: '',
dotfiles: true,
message: '📦 Shared UI v' + getVersion()
});
}
}) )
);

// Release showcase.
function publishShowcase() {

return ghpages.publish( '_dist/showcase/', {
task(
'publishShowcase',
() => src( './_dist/showcase/**/**/*' ).pipe( ghPages({
remoteUrl: 'https://github.com/wpmudev/shared-ui.git',
branch: 'gh-pages',
repo: 'https://github.com/wpmudev/shared-ui.git',
dest: '',
dotfiles: true,
message: '📦 Shared UI Showcase with SUI v' + getVersion()
});
}
}) )
);

/**
* Export functions.
Expand Down Expand Up @@ -474,6 +472,5 @@ exports.copy = gulp.series(
copyComponents
)
);

exports.watch = watch;
exports.publishLibrary = publishLibrary;
exports.publishShowcase = publishShowcase;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"gulp-clean-css": "^4.3.0",
"gulp-concat": "2.6.1",
"gulp-eslint7": "^0.3.2",
"gulp-gh-pages": "^0.5.4",
"gulp-header": "^2.0.9",
"gulp-notify": "^4.0.0",
"gulp-rename": "^2.0.0",
Expand Down

0 comments on commit 0248349

Please sign in to comment.