Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including gulp-gh-pages with all npm packages installed. Try it out:

var gulpGhPages = require("gulp-gh-pages")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gulp-gh-pages v0.5.4

gulp plugin to publish contents to Github pages


NPM version Build Status Build status Coverage Status Dependency Status devDependency Status

gulp plugin to publish contents to Github pages


Use npm.

npm install --save-dev gulp-gh-pages


Define a deploy task in your gulpfile.js (as below) which can be used to push to gh-pages going forward.

var gulp = require('gulp');
var ghPages = require('gulp-gh-pages');

gulp.task('deploy', function() {
  return gulp.src('./dist/**/*')

Now, you should be able to call your task by doing:

gulp deploy


var ghPages = require('gulp-gh-pages');


options: Object
Return: Object (stream.Transform)


Type: String
Default: URL for the remote of the current dir (assumes a git repository)

By default gulp-gh-pages assumes the current working directory is a git repository and uses its remote url. If your gulpfile.js is not in a git repository, or if you want to push to a different remote url, you can specify it. Ensure you have write access to the repository.


Type: String
Default: "origin"

Git remote.


Type: String
Default: "gh-pages"

The branch where deploy will by done. Change to "master" for projects.


Type: String
Default: .publish

Set the directory path to keep a cache of the repository. If it doesn't exist, gulp-gh-pages automatically create it.


Type: Boolean
Default: true

Allow you to make a build on the defined branch without pushing it to master. Useful for dry run.


Type: Boolean
Default: false

Force adding files to the gh-pages branch, even if they are ignored by .gitignore or .gitignore_global.


Type: String
Default: "Update [timestamp]"

Edit commit message.


Copyright (c) 2014 Micheal Benedict, 2015 Shinnosuke Watanabe

Licensed under the MIT License.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free