git-push
v0.1.1
Published
Use git-push to deploy your website to Azure, Heroku, GitHub Pages or any another hosting provider supporting Git-based deployments.
Downloads
134
Maintainers
Readme
git-push
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('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
- Continuous deployment using Git in Azure App Service by Windows Azure
- Kudu - the engine behind Git deployments in Azure Web Apps by Windows Azure
- How To Set Up Automatic Deployment with Git with a VPS by DigitalOcean
- Deploying with Git by Heroku
- Git as a deployment tool by gitolite
License
The MIT License (MIT) © Konstantin Tarkus (@koistya)