Giter Club home page Giter Club logo

git-push's Introduction

git-push

NPM version NPM downloads Build Status Dependency Status Tips Discussion

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

Install

npm install git-push --save-dev

Example 1

// deploy.js

var push = require('git-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 del = require('del');
var push = require('git-push');
var argv = require('minimist')(process.argv.slice(2));

gulp.task('clean', del.bind(null, ['build/*', '!build/.git'], {dot: true}));

gulp.task('build', ['clean'], 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 © Konstantin Tarkus (@koistya)

git-push's People

Contributors

koistya avatar nason avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.