Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koistya/git-push
Use git-push to deploy your website to Azure, Heroku, GitHub Pages or any another hosting provider supporting Git-based deployments.
https://github.com/koistya/git-push
Last synced: 3 months ago
JSON representation
Use git-push to deploy your website to Azure, Heroku, GitHub Pages or any another hosting provider supporting Git-based deployments.
- Host: GitHub
- URL: https://github.com/koistya/git-push
- Owner: koistya
- License: mit
- Created: 2015-04-15T15:11:28.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-11-07T07:58:01.000Z (over 5 years ago)
- Last Synced: 2024-11-02T03:50:25.521Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 384 KB
- Stars: 30
- Watchers: 3
- Forks: 10
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# git-push
[](https://www.npmjs.com/package/git-push)
[](https://www.npmjs.com/package/git-push)
[](https://travis-ci.org/koistya/git-push)
[](https://david-dm.org/koistya/git-push)
[](https://gratipay.com/koistya)
[](https://github.com/koistya/git-push/issues/2)> Use [git-push](https://github.com/koistya/git-push) to deploy your website to
> [Azure](http://azure.microsoft.com/services/app-service/web/), [Heroku](https://www.heroku.com/),
> [GitHub Pages](https://pages.github.com/) or any other hosting provider
> supporting Git-based deployments.## Install
```sh
npm install git-push --save-dev
```### Example 1
```js
// deploy.jsvar push = require('git-push');
push('./app', 'http://github.com/example/example.github.io', function() {
console.log('Done!');
});
``````sh
$ node deploy.js
```### Example 2
```js
// gulpfile.jsvar 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);
});
``````sh
$ gulp build --release
$ gulp deploy --production
```## API
##### push(sourceDir, remote, callback);
## Reference
- [Continuous deployment using Git in Azure App Service](http://azure.microsoft.com/documentation/articles/web-sites-publish-source-control/) by Windows Azure
- [Kudu - the engine behind Git deployments in Azure Web Apps](https://github.com/projectkudu/kudu) by Windows Azure
- [How To Set Up Automatic Deployment with Git with a VPS](https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps) by DigitalOcean
- [Deploying with Git](https://devcenter.heroku.com/articles/git) by Heroku
- [Git as a deployment tool](http://gitolite.com/deploy.html) by gitolite## License
The MIT License © Konstantin Tarkus ([@koistya](https://twitter.com/koistya))