commit 945c5ffe40dc306e7519a6aa48ecc2dae4edd2f0
parent de49fbb53268afabb8215e2d74383e0983485d9e
Author: Konstantin Tarkus <hello@tarkus.me>
Date: Wed, 15 Apr 2015 18:26:30 +0300
Replace `gulp-gh-pages` with `git-push` in gulpfile.js
Diffstat:
3 files changed, 9 insertions(+), 22 deletions(-)
diff --git a/README.md b/README.md
@@ -78,9 +78,7 @@ synchronized browsing across multiple devices and browsers.
$ gulp deploy # or, `gulp deploy --production`
```
-You can deploy to different destinations by adding a corresponding flag.
-For example `--production` or `--staging` etc. See the 'deploy' task in
-`gulpfile.js`.
+For more information see 'deploy' task in `gulpfile.js`.
### How to Update
diff --git a/gulpfile.js b/gulpfile.js
@@ -190,24 +190,13 @@ gulp.task('sync', ['serve'], function(cb) {
});
});
-// Deploy to GitHub Pages
-gulp.task('deploy', function() {
-
- // Remove temp folder
- if (argv.clean) {
- var os = require('os');
- var repoPath = path.join(os.tmpdir(), 'tmpRepo');
- $.util.log('Delete ' + $.util.colors.magenta(repoPath));
- del.sync(repoPath, {force: true});
- }
-
- return gulp.src('build/**/*')
- .pipe($.if('**/robots.txt', !argv.production ?
- $.replace('Disallow:', 'Disallow: /') : $.util.noop()))
- .pipe($.ghPages({
- remoteUrl: 'https://github.com/{name}/{name}.github.io.git',
- branch: 'master'
- }));
+// Deploy via Git
+gulp.task('deploy', function(cb) {
+ var push = require('git-push');
+ var remote = argv.production ?
+ 'https://github.com/{user}/{repo}.git' :
+ 'https://github.com/{user}/{repo}-test.git';
+ push('./build', remote, cb);
});
// Run PageSpeed Insights
diff --git a/package.json b/package.json
@@ -32,12 +32,12 @@
"del": "^1.1.1",
"eslint": "^0.18.0",
"eslint-loader": "^0.9.0",
+ "git-push": "^0.1.0",
"gulp": "^3.8.11",
"gulp-autoprefixer": "^2.1.0",
"gulp-cache": "^0.2.8",
"gulp-changed": "^1.2.1",
"gulp-csscomb": "^3.0.3",
- "gulp-gh-pages": "^0.5.0",
"gulp-htmlmin": "^1.1.1",
"gulp-if": "^1.2.5",
"gulp-imagemin": "^2.2.1",