0.2.0 • Published 4 years ago

deployment-cli v0.2.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

A frontend deployment tool base on ssh2

Getting Started

npm i -D deployment-cli

npx deployment-cli --config "path/to/configuration/file"

or

npm i -g deployment-cli

deployment-cli --config "path/to/configuration/file"

Usage

deployment-cli [options]

Options:
  -V, --version        output the version number
  -C, --config <path>  configuration file path
  -h, --help           output usage information

Configuration file

// example deploy.config.js
module.exports = {
  repository: {
    // local: true,
    type: 'git',
    url: 'https://git.dev.tencent.com/cyxuan0926/prison-web.git',
    branch: 'master'
  },

  buildConfig: {
    commands: ['npm ci', 'npm run build:test'],
    outputDir: 'dist',
    assetsPatterns: ['static', 'index.html']
  },

  remoteOperatesConfig: {
    remotePath: '/root/deployment-cli-test'
  },

  connectConfig: {
    host: '192.168.0.114',
    port: 22,
    username: 'root',
    password: '123456',
    // privateKey: require('fs').readFileSync('/here/is/my/key')
  }
}