tooling / book-of-modern-frontend-tooling

The Front-end Tooling Book
http://tooling.github.io/book-of-modern-frontend-tooling/
2.53k stars 177 forks source link

Add deploy task in gulpfile.js (#39) #46

Closed michealbenedict closed 10 years ago

michealbenedict commented 10 years ago

This PR addresses two things

  1. 39 by adding a deploy task to gulpfile.js

  2. Update versions of dependencies in package.json

The gulp task deploy (using gulp-gh-pages plugin) does the following:

  1. Clone remote repo
  2. Checkout gh-pages branch (create if it doesn't exist)
  3. Copy files specified in gulp.src
  4. Add files (if no new changes are detected, it stops here)
  5. Commit with message "Updates"
  6. Push to remote

The task looks as below.

gulp.src([])
.pipe(deploy(gitRemoteUrl, remote) // plugin emits the files for further piping

Again, feedback appreciated.

addyosmani commented 10 years ago

LGTM. Thanks a bunch @rowoot! :) cc @sindresorhus for a review before we land this.

sindresorhus commented 10 years ago

lgtm2 :)