Skip to main content

Introduction

What is wukong-deploy?​

wukong-deploy is a lightweight Node.js-based deployment tool that helps you quickly deploy code to remote servers. With simple configuration, you can execute a series of remote commands with one click, easily achieving automated deployment processes.

Features​

  • πŸš€ One-click deployment to remote servers
  • πŸ” Secure SSH and SCP transfer support
  • πŸ“ Flexible file and folder management
  • πŸ“¦ Simple configuration file management
  • 🌍 Multi-language support (Chinese/English)
  • πŸ§ͺ Robust error handling mechanism

Installation​

Using npm:

npm install -g wukong-deploy

Or using yarn:

yarn global add wukong-deploy

Basic Usage​

  1. Initialize configuration file:
wukong-deploy init
  1. Edit configuration file:
// config/config.mjs
export default {
servers: {
dev: {
name: 'Development Server',
host: '192.168.1.100',
username: 'root',
passwordEnv: 'SERVER_PASSWORD', // .env, SERVER_53_PASSWORD="yourpassowrd"
commands: [
{
cmd: 'git pull',
cwd: '/path/to/project',
description: 'Update code',
},
{
cmd: 'npm install',
cwd: '/path/to/project',
description: 'Install dependencies',
},
],
},
},
};
  1. Start deployment:
wukong-deploy deploy

Next Steps​