This commit is contained in:
Luk Lu
2021-09-12 13:45:21 +08:00
parent e844fd5903
commit 5885714712
2 changed files with 10 additions and 22 deletions

View File

@@ -1,40 +1,28 @@
module.exports={
deploy: {
from: './dist', // 待部署到的文件夹
type: 'git',
repo: 'https://github.com/vichome/app', // 待部署到的主机
gitname: 'vic-team',
gitemail: 'vic-team@outlook.com',
password: '', // 登录用户密码
key: `${process.env.HOME}/.ssh/id_rsa`, // 登录用户私钥文件
},
}
module.exports = { module.exports = {
deploy: { deploy: {
fromPath: "./dist", fromPath: "./dist",
gotoTarget: "github", gotoTarget: "github",
github: { github: {
targetType: "git", targetType: "git",
repo: "https://github.com/tuc-vic/vic.bittic.org", repo: "https://github.com/tuc-vic/vic-app.bittic.org",
branch: "main", branch: "main",
gitname: "log-team", gitname: "vic-team",
gitemail: "log-team@outlook.com", gitemail: "vic-team@outlook.com",
url: 'http://vic.bittic.org' url: 'http://vic-app.bittic.org'
}, },
vultr: { vultr: {
targetType: "ssh", targetType: "ssh",
host: "vic.bittic.org", host: "vic-app.bittic.org",
targetPath: "/faronear/tuc-vic/vic.webhome.hexo", targetPath: "/faronear/tuc-vic/vic.user.react",
targetDir: "public", targetDir: "dist",
user: "adot", user: "adot",
password: "", password: "",
key: `${process.env.HOME}/.ssh/id_rsa`, // 登录用户私钥文件 key: `${process.env.HOME}/.ssh/id_rsa`, // 登录用户私钥文件
}, },
unicloud: { unicloud: {
targetType: "serverless", targetType: "serverless",
space: "cn-bittic-vic", space: "cn-bittic-vic-app",
url: "http://vic.bittic.cn", url: "http://vic-app.bittic.cn",
}, },
}, },
}; };

View File

@@ -11,7 +11,7 @@
"test": "umi test", "test": "umi test",
"dist": "umi build", "dist": "umi build",
"deploy": "node ./node_modules/sol.deployer/deploy.js", "deploy": "node ./node_modules/sol.deployer/deploy.js",
"allinone": "npm run dist && npm run deploy", "allinone": "npm run boot && npm run dist && npm run deploy",
"drive.pm2": "cross-env NODE_ENV=production pm2 start ./node_modules/sol.webserver/server.js --name vic.user.react" "drive.pm2": "cross-env NODE_ENV=production pm2 start ./node_modules/sol.webserver/server.js --name vic.user.react"
}, },
"dependencies": { "dependencies": {