add deploy script
This commit is contained in:
parent
7eed5f6837
commit
26a0e8775e
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "poles",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "www.poles.ac.cn website",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "npm test",
|
||||
"d": "shipit main deploy"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@git.westgis.ac.cn:westdc/westdc-zf1.git"
|
||||
},
|
||||
"keywords": [
|
||||
"poles"
|
||||
],
|
||||
"author": "jianxuanli",
|
||||
"license": "ISC"
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
module.exports = function (shipit) {
|
||||
shipit.initConfig({
|
||||
main: {
|
||||
servers: 'lijianxuan@sj'
|
||||
}
|
||||
});
|
||||
|
||||
shipit.task('deploy', async function () {
|
||||
try{
|
||||
await shipit.remote('sudo /usr/bin/git pull', {'cwd': '/var/www/poles.ac.cn'});
|
||||
// await shipit.remote('/usr/local/bin/pm2 restart henan', {'cwd': '/home/mapljx/henan/henanWeb'});
|
||||
}catch (e){
|
||||
console.log(e.message);
|
||||
}
|
||||
});
|
||||
|
||||
};
|
Loading…
Reference in New Issue