git-push

0.1.1 • Public • Published

git-push Tips

Use git-push to deploy your website to Azure, Heroku, GitHub Pages or any other hosting provider supporting Git-based deployments.

Install

NPM

npm install git-push --save-dev

Example 1

// deploy.js
 
var push = require('get-push');
 
push('./app', 'http://github.com/example/example.github.io', function() {
  console.log('Done!');
});
$ node deploy.js

Example 2

// gulpfile.js
 
var gulp = require('gulp');
var push = require('get-push');
var argv = require('minimist')(process.argv.slice(2));
 
gulp.task('build', function() {
  // TODO: Build website from source files into the `./build` folder
});
 
gulp.task('deploy', function(cb) {
  var remote = argv.production ?
    {name: 'production', url: 'http://github.com/user/example.com', branch: 'gh-pages'},
    {name: 'test', url: 'http://github.com/user/test.example.com', branch: 'gh-pages'};
  push('./build', remote, cb);
});
$ gulp build --release
$ gulp deploy --production

API

push(sourceDir, remote, callback);

Reference

License

The MIT License (MIT) © Konstantin Tarkus (@koistya)

Package Sidebar

Install

npm i git-push

Weekly Downloads

23

Version

0.1.1

License

none

Last publish

Collaborators

  • koistya