diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 1fa657f..41c0657 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -13,6 +13,7 @@ module.exports = (grunt) -> 'slides/{,*/}*.{md,html}' 'js/*.js' 'css/*.css' + 'img/*' ] index: @@ -30,7 +31,7 @@ module.exports = (grunt) -> jshint: files: ['js/*.js'] tasks: ['jshint'] - + sass: files: ['css/source/theme.scss'] tasks: ['sass'] @@ -40,7 +41,7 @@ module.exports = (grunt) -> theme: files: 'css/theme.css': 'css/source/theme.scss' - + connect: livereload: @@ -80,6 +81,7 @@ module.exports = (grunt) -> 'bower_components/**' 'js/**' 'css/*.css' + 'img/*' ] dest: 'dist/' },{ @@ -89,7 +91,19 @@ module.exports = (grunt) -> filter: 'isFile' }] - + + buildcontrol: + + options: + dir: 'dist' + commit: true + push: true + message: 'Built from %sourceCommit% on branch %sourceBranch%' + pages: + options: + remote: 'git@github.com:atomaka/intro-to-vagrant.git' + branch: 'gh-pages' + # Load all grunt tasks. @@ -133,7 +147,13 @@ module.exports = (grunt) -> 'copy' ] - + + grunt.registerTask 'deploy', + 'Deploy to Github Pages', [ + 'dist' + 'buildcontrol' + ] + # Define default task. grunt.registerTask 'default', [ diff --git a/package.json b/package.json index 5ed8815..e1561ca 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "grunt-contrib-copy": "^0.7.0", "grunt-contrib-jshint": "^0.10.0", "load-grunt-tasks": "^1.0.0", + "grunt-build-control": "^0.2.2", "grunt-coffeelint": "0.0.13" }, "engines": {