Easy deployment on Github pages with GruntJS
You have your wonderful node app located at github.com/you/yourawesomenodeapp and a demo or docs located at you.github.io/yourawesomenodeapp, right?
Well, it's extremely easy to deploy it with grunt-gh-pages!
$ npm install grunt-gh-pages --save-dev
Then add it on your Gruntfile:
'gh-pages': {
options: {
base: 'dist' ,
message: 'Generated by grunt gh-pages'
} ,
src: ['**/*']
}
And create a new deploy task in the same file:
grunt.registerTask ('deploy', ['gh-pages']);
Now, when you finish to make the build of your current project under dist folder, launch the following command:
$ grunt deploy
And your gh-pages branch will be updated automagically!
Have fun!
Written by Vincenzo Ferrari
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Deploy
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#