UNPKG

zhangdocs

Version:

Simple document generation tool. Dependence Node.js run.

27 lines (19 loc) 600 B
// var ghpages = require('gh-pages'); var path = require('path'); var shell = require('shelljs'); var log = console.log; module.exports = deploy function deploy(commander){ shell.exec('git add -A', {silent: true}); shell.exec('git commit -m "'+new Date()+'"', {silent: true}); var pushCmd = shell.exec('git push -f origin gh-pages', { async: true, silent: false }); pushCmd.stdout.on('data', function (data) { log("commit:",data) }); pushCmd.stderr.on('data', function (data) { log(data); }); }