Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
28 lines (26 loc) · 886 Bytes

File metadata and controls

28 lines (26 loc) · 886 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var exec = require('child_process').exec;
var ghpages = require('gh-pages');
var loading = require('loading-cli');
var path = require('path');
var fs = require('fs');
var color = require('colors-cli/safe');
var error = color.red.bold;
var warn = color.yellow;
var notice = color.blue;
var success = color.green;
var deploy_path = path.join(process.cwd(), '.deploy');
if(fs.existsSync(deploy_path)){
var load = loading(' Pushing code!!')
load.start();
ghpages.publish(deploy_path,{
repo: 'https://github.com/jaywcjlove/linux-command.git',
branch: 'gh-pages',
message: 'Compiler generation page ' + new Date()
}, function(err) {
if(err) return console.log(error(' → '+"ok!"+err));
load.stop()
console.log(success('\n\n '+"Push success!!"));
// 删除文件夹
exec('rm -rf .deploy');
});
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.