Skip to content
This repository has been archived by the owner on Dec 29, 2017. It is now read-only.

Commit

Permalink
Add gh-pages Grunt task.
Browse files Browse the repository at this point in the history
  • Loading branch information
philipwalton committed May 12, 2013
1 parent cffb9b8 commit 97f6813
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
18 changes: 18 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ module.exports = function(grunt) {
files: ["Gruntfile.js"],
tasks: ["default"],
}
},
shell: {
checkoutGhPages: {
command: "git checkout gh-pages"
},
rebaseMaster: {
command: "git rebase master"
},
pushGhPages: {
command: "git push origin gh-pages"
},
checkoutMaster: {
command: "git rebase master"
}
}
});

Expand All @@ -80,8 +94,12 @@ module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-compass");
grunt.loadNpmTasks('grunt-shell');

// Default task.
grunt.registerTask("default", ["compass", "concat", "jshint", "uglify"]);

// Push gh-pages branch to Github Pages
grunt.registerTask("gh-pages", ["shell:checkoutGhPages", "shell:rebaseMaster", "shell:pushGhPages", "shell:checkoutMaster"]);

};
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"grunt-contrib-uglify": "*",
"grunt-contrib-watch": "*",
"grunt-contrib-jshint": "~0.1.1",
"grunt-contrib-jshint": "~0.1.1",
"grunt-contrib-nodeunit": "~0.1.2",
"grunt-contrib-compass": "*"
"grunt-contrib-compass": "*",
"grunt-shell": "~0.2.2"
}
}
}

0 comments on commit 97f6813

Please sign in to comment.