“Deploy CLI” is a one-click deployment CLI tool that allows users to deploy programs to servers with just one command based on their configurations. This tool can help users quickly deploy programs and improve efficiency.
This parameter is applicable only to the yarn method. Other methods are not applicable
- node >=16.0.0
- npm >=7.0.0
yarn global add @kexin88/deploy-cli
Deprecated:
npm uninstall -g
does not trigger thepreuninstall
event and therefore cannot delete the global binary file.
curl -fsSL https://github.com/kexin8/auto-deploy/releases/download/install/install.sh | sh
China mainland users can use the following command to speed up the download
curl -fsSL https://ghproxy.com/https://github.com/kexin8/auto-deploy/releases/download/install/install.sh | sh -s https://ghproxy.com
# Optional: Needed to run a remote script the first time
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://github.com/kexin8/auto-deploy/releases/download/install/install.ps1 | iex
# if you can't access github, you can use proxy
irm https://github.com/kexin8/auto-deploy/releases/download/install/install.ps1 -Proxy '<host>:<ip>' | iex
China mainland users can use the following command to speed up the download
# Optional: Needed to run a remote script the first time
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://ghproxy.com/https://github.com/kexin8/auto-deploy/releases/download/install/install_ZH-CN.ps1 | iex
deploy --version
Run deploy init
command to initialize the configuration file.
The configuration file is located in the current directory. The default name is dyconfig.json
.
If you want to all the configuration file to be named dyconfig.json
, you can add -a
parameter.
Detailed configuration file description can be found in Configuration.
Example:
deploy init
# or
deploy init -a
Run deploy
command to deploy program to server.
The configuration file is located in the current directory. The default name is dyconfig.json
.
Example:
deploy
# or
deploy /path/to/dyconfig.json
More commands can be found by running deploy --help
or deploy -h
command.
$ deploy -h
NAME:
deploy - this is a simple cli app that automates deploy
USAGE:
deploy [\path\to\config.json]
VERSION:
v1.3.0-pre
DESCRIPTION:
This is a simple cli app that automates deploy.
e.g. This is a common way to perform deploy, according to dyconfig.json in the current path
deploy
This is manually specifying the configuration file
deploy \path\to\config.json
COMMANDS:
init
upgrade upgrade deploy
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
The configuration file is a json file, which can be generated by running deploy init
command.
Field | Type | Required | Description |
---|---|---|---|
address | string | true | The address of the server to be deployed. |
username | string | true | The username of the server to be deployed. |
password | string | true | The password of the server to be deployed. |
srcFile | string | true | The path of the file to be deployed. allow multiple files to be separated by commas. |
workDir | string | false | The path of the directory to be deployed. |
changeWorkDir | boolean | false | Whether to change the working directory. |
preCmd | string[] | false | The commands to be executed before deployment. |
postCmd | string[] | false | The commands to be executed after deployment. |
Example:
{
"address": "127.0.0.1:22",
"username": "username",
"password": "password",
"srcFile": "file1,file2,...",
"workDir": "/path/to/workDir",
"changeWorkDir": true,
"preCmd": [
"echo 'preCmds'"
],
"postCmd": [
"echo 'postCmds'"
]
}
👤 kexin8
- Github: @kexin8
Contributions, issues and feature requests are welcome!
Feel free to
check issues page. You can also take a look at
the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2023 kexin8.
This project is ISC licensed.
This README was generated with ❤️ by readme-md-generator