Publish a folder to a given branch (like gh-pages).
You can use this from the command-line or within your build system.
npm install buildbranch -g
Then, from your master branch, run
buildbranch with the branch and directory
you want to publish. It will default to
buildbranch gh-pages www example.com
buildbranch as a development dependency:
npm install buildbranch --save-dev
Then, use it in your build system:
For example in gulp you can do it like this:
var gulp = ;var buildBranch = ;gulp;
Required. An object containing the following options.
The branch on wich to publish.
The remote repository on wich to publish.
The folder in wich the build is.
The domain name that will fill the cname file.
The name of the file enabling custom domain name on you build platform.
Default: 'Build $'
The commit label, the first
$ occurrence in the given string will be replaced
by the current date.
The working directory (root of the git repo).
A list of files to ignore. 'node_modules' and '.git' will be automatically added to the ignore list.
Required. Called when the publication is done.
You may want to contribute to this project, pull requests are welcome if you accept to publish under the MIT licence.