Skip to content

lifechat/D-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

D-Deploy

GitHub release (latest by date) license-MIT build-passing star-100 node npm

Web前端项目自动部署脚本

Install

npm install d-deploy

Usage

进入项目目录下

import deploy from 'd-deploy';

deploy();

deploy.config.json

  • name: 名称

  • local

    • distDir: 本地打包输出的路径
    • distArchive: 压缩打包文件的路径
    • putFiles: 其他文件
  • server

    • host: 服务器 IP
    • username: 服务器的登录用户名
    • port: 端口
    • serverDir: 项目路径
    • bakeup: 是否备份压缩包
  • cdn: 选填 为flase或不填则不传cdn

    • phoneNumber:
    • password:
    • uploadDir: 上传打包的路径
    • cdnDir: 上传七牛服务器路径,建议传package.json name/version
[
  {
    "name": "prod",
    "cdn": {
      "phoneNumber": "10086",
      "password": "12345",
      "uploadDir": "./dist",
      "cdnDir": "pkgName/1.0.0"
    },
    "local": {
      "distDir": "./dist/*.*",
      "distArchive": "./deploy/dist.tar.gz",
      "putFiles": ["./deploy/pm2.prod.json", "./deploy/server.js"]
    },
    "server": {
      "host": "",
      "username": "devops",
      "port": 33,
      "serverDir": "/data/test",
      "bakeup": false
    }
  }
]

About

自动化部署脚本

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published