Browse Source

Use oghliner to deploy to GitHub Pages

master
Marco Castelluccio 9 years ago
parent
commit
66ce7f5126
  1. 6
      Makefile
  2. 15
      gulpfile.js
  3. 1
      package.json

6
Makefile

@ -13,11 +13,9 @@ ghdist:
cd dist && git checkout gh-pages cd dist && git checkout gh-pages
publish: publish:
./node_modules/gulp/bin/gulp.js clean ./node_modules/gulp/bin/gulp.js build
cd dist && git pull origin gh-pages
./node_modules/gulp/bin/gulp.js publish
echo -n "Please open http://localhost:8000/dist/index.html and check if everything works fine." && read -e 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: bump:
./node_modules/gulp/bin/gulp.js bump ./node_modules/gulp/bin/gulp.js bump

15
gulpfile.js

@ -10,6 +10,7 @@ var st = require('st');
var less = require('gulp-less'); var less = require('gulp-less');
var del = require('del'); var del = require('del');
var runSequence = require('run-sequence'); var runSequence = require('run-sequence');
var oghliner = require('oghliner');
// The generated file is being created at src // The generated file is being created at src
// so it can be fetched by usemin. // 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 = [ var sources = [
'./dist/**/*', './dist/**/*',
'!dist/manifest.*', '!dist/manifest.*',
@ -250,7 +251,7 @@ gulp.task('bump', ['update-version-manifests', 'update-version-config'], functio
gulp.start('update-version-comments'); gulp.start('update-version-comments');
}); });
gulp.task('build', function(callback) { gulp.task('build', ['clean'], function(callback) {
runSequence( runSequence(
'less', 'less',
'usemin', 'usemin',
@ -261,10 +262,10 @@ gulp.task('build', function(callback) {
gulp.task('package', ['cleanup-dist']); gulp.task('package', ['cleanup-dist']);
gulp.task('publish', ['build'], function() { gulp.task('deploy', ['add-appcache-manifest'], function() {
gulp.start('add-appcache-manifest'); return oghliner.deploy({
rootDir: 'dist/',
}); });
gulp.task('default', ['clean'], function() {
gulp.start('build');
}); });
gulp.task('default', ['build']);

1
package.json

@ -61,6 +61,7 @@
"gulp-usemin": "^0.3.11", "gulp-usemin": "^0.3.11",
"gulp-zip": "^0.1.2", "gulp-zip": "^0.1.2",
"http": "0.0.0", "http": "0.0.0",
"oghliner": "^1.0.1",
"run-sequence": "^1.0.2", "run-sequence": "^1.0.2",
"st": "^0.5.2" "st": "^0.5.2"
} }

Loading…
Cancel
Save