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β
- Initialize configuration file:
wukong-deploy init
- 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',
},
],
},
},
};
- Start deployment:
wukong-deploy deploy
Next Stepsβ
- Check the Configuration Guide for more options
- Learn Best Practices to optimize your deployment
- Explore Advanced Features for more capabilities