Skip to content

Repository files navigation

轻量级部署工具

使用

安装

pnpm i @bmjs/light-deploy -D

pnpm approve-builds

配置

// deploy.config.ts
// deploy.config.prod.ts

import { defineConfig } from '@bmjs/light-deploy'

export default defineConfig({
  ssh: {
    host: '172.16.20.150',
    username: 'root',
    password: 'xxx',
    port: 22
  },
  project: {
    // 本地项目打包产物所在目录
    distDir: 'dist',
    // 对应服务器上项目所在目录
    serverWebDir: '/root/test'
  }
})
// package.json
{
  "scripts": {
    "deploy": "light-deploy",
    // "deploy:prod": "light-deploy --mode prod",
  }
}
  • deploy.config.[mode].ts文件名中的[mode]package.json 中的 light-deploy --mode [mode] 保持一致

About

light-deploy

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages