From 66ce7f5126375f02e4e2e019ffb229dbb294461d Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Wed, 25 Nov 2015 16:47:02 +0000 Subject: [PATCH] Use oghliner to deploy to GitHub Pages --- Makefile | 8 +++----- gulpfile.js | 15 ++++++++------- package.json | 1 + 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 5dcea9b3..6d326a8e 100644 --- a/Makefile +++ b/Makefile @@ -13,11 +13,9 @@ ghdist: cd dist && git checkout gh-pages publish: - ./node_modules/gulp/bin/gulp.js clean - cd dist && git pull origin gh-pages - ./node_modules/gulp/bin/gulp.js publish + ./node_modules/gulp/bin/gulp.js build echo -n "Please open http://localhost:8000/dist/index.html and check if everything works fine." && read -e - cd dist && git add --all . && git commit -am "merged with master" && git push origin gh-pages + ./node_modules/gulp/bin/gulp.js deploy bump: ./node_modules/gulp/bin/gulp.js bump @@ -32,4 +30,4 @@ txupdate: txupload: tx pull -f - tx push -s \ No newline at end of file + tx push -s diff --git a/gulpfile.js b/gulpfile.js index 4eef6acd..625744e1 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -10,6 +10,7 @@ var st = require('st'); var less = require('gulp-less'); var del = require('del'); var runSequence = require('run-sequence'); +var oghliner = require('oghliner'); // The generated file is being created at src // so it can be fetched by usemin. @@ -152,7 +153,7 @@ gulp.task('disable-production', function() { ); }); -gulp.task('add-appcache-manifest', function() { +gulp.task('add-appcache-manifest', ['build'], function() { var sources = [ './dist/**/*', '!dist/manifest.*', @@ -250,7 +251,7 @@ gulp.task('bump', ['update-version-manifests', 'update-version-config'], functio gulp.start('update-version-comments'); }); -gulp.task('build', function(callback) { +gulp.task('build', ['clean'], function(callback) { runSequence( 'less', 'usemin', @@ -261,10 +262,10 @@ gulp.task('build', function(callback) { gulp.task('package', ['cleanup-dist']); -gulp.task('publish', ['build'], function() { - gulp.start('add-appcache-manifest'); +gulp.task('deploy', ['add-appcache-manifest'], function() { + return oghliner.deploy({ + rootDir: 'dist/', + }); }); -gulp.task('default', ['clean'], function() { - gulp.start('build'); -}); +gulp.task('default', ['build']); diff --git a/package.json b/package.json index 95f4a543..09993053 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "gulp-usemin": "^0.3.11", "gulp-zip": "^0.1.2", "http": "0.0.0", + "oghliner": "^1.0.1", "run-sequence": "^1.0.2", "st": "^0.5.2" }