mirror of
				https://github.com/appleboy/drone-ssh.git
				synced 2025-10-29 00:51:15 +08:00 
			
		
		
		
	docs: refine and unify documentation wording and formatting
- Improve and clarify English wording and formatting throughout the documentation for better readability - Update section titles and add missing punctuation for consistency - Revise build instructions and descriptions for accuracy and clarity - Enhance phrasing in Chinese (Simplified and Traditional) documentation for clarity and consistency - Remove outdated explanatory comments and improve example references in all README files Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
		
							parent
							
								
									6b748335c1
								
							
						
					
					
						commit
						734d4df2c8
					
				
							
								
								
									
										35
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								README.md
									
									
									
									
									
								
							| @ -11,16 +11,15 @@ | |||||||
| [](https://goreportcard.com/report/github.com/appleboy/drone-ssh) | [](https://goreportcard.com/report/github.com/appleboy/drone-ssh) | ||||||
| [](https://hub.docker.com/r/appleboy/drone-ssh/) | [](https://hub.docker.com/r/appleboy/drone-ssh/) | ||||||
| 
 | 
 | ||||||
| Drone plugin to execute commands on a remote host through SSH. For the usage | A Drone plugin for executing commands on remote hosts via SSH. For usage instructions and a list of available options, please refer to [the documentation](http://plugins.drone.io/appleboy/drone-ssh/). | ||||||
| information and a listing of the available options please take a look at [the docs](http://plugins.drone.io/appleboy/drone-ssh/). |  | ||||||
| 
 | 
 | ||||||
| **Note: Please update your image config path to `appleboy/drone-ssh` for drone. `plugins/ssh` is no longer maintained.** | **Note: Please update your Drone image config path to `appleboy/drone-ssh`. The `plugins/ssh` image is no longer maintained.** | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
| 
 | 
 | ||||||
| ## Breaking changes | ## Breaking Changes | ||||||
| 
 | 
 | ||||||
| `v1.5.0`: change command timeout flag to `Duration`. See the following setting: | As of `v1.5.0`, the command timeout flag has changed to use the `Duration` format. See the following example: | ||||||
| 
 | 
 | ||||||
| ```diff | ```diff | ||||||
| pipeline: | pipeline: | ||||||
| @ -40,21 +39,21 @@ pipeline: | |||||||
|         - echo "Hello World" |         - echo "Hello World" | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| ## Build or Download a binary | ## Build or Download a Binary | ||||||
| 
 | 
 | ||||||
| The pre-compiled binaries can be downloaded from [release page](https://github.com/appleboy/drone-ssh/releases). Support the following OS type. | Pre-compiled binaries are available on the [releases page](https://github.com/appleboy/drone-ssh/releases), supporting the following operating systems: | ||||||
| 
 | 
 | ||||||
| - Windows amd64/386 | - Windows amd64/386 | ||||||
| - Linux arm/amd64/386 | - Linux arm/amd64/386 | ||||||
| - Darwin amd64/386 | - macOS (Darwin) amd64/386 | ||||||
| 
 | 
 | ||||||
| With `Go` installed | If you have `Go` installed: | ||||||
| 
 | 
 | ||||||
| ```sh | ```sh | ||||||
| go install github.com/appleboy/drone-ssh@latest | go install github.com/appleboy/drone-ssh@latest | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| or build the binary with the following command: | Or build the binary manually with the following commands: | ||||||
| 
 | 
 | ||||||
| ```sh | ```sh | ||||||
| export GOOS=linux | export GOOS=linux | ||||||
| @ -69,7 +68,7 @@ go build -v -a -tags netgo -o release/linux/amd64/drone-ssh . | |||||||
| 
 | 
 | ||||||
| ## Docker | ## Docker | ||||||
| 
 | 
 | ||||||
| Build the docker image with the following commands: | Build the Docker image with the following command: | ||||||
| 
 | 
 | ||||||
| ```sh | ```sh | ||||||
| make docker | make docker | ||||||
| @ -77,7 +76,7 @@ make docker | |||||||
| 
 | 
 | ||||||
| ## Usage | ## Usage | ||||||
| 
 | 
 | ||||||
| Execute from the working directory: | Run from your working directory: | ||||||
| 
 | 
 | ||||||
| ```sh | ```sh | ||||||
| docker run --rm \ | docker run --rm \ | ||||||
| @ -90,13 +89,13 @@ docker run --rm \ | |||||||
|   ghcr.io/appleboy/drone-ssh |   ghcr.io/appleboy/drone-ssh | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| ## Mount key from file path | ## Mount Key from File Path | ||||||
| 
 | 
 | ||||||
| Please make sure that enable the `trusted` mode in project setting for [drone 0.8 version](https://0-8-0.docs.drone.io/). | Make sure to enable `trusted` mode in your project settings (for [Drone 0.8 version](https://0-8-0.docs.drone.io/)). | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
| 
 | 
 | ||||||
| Mount private key in `volumes` setting of `.drone.yml` config | Mount the private key in the `volumes` section of your `.drone.yml` config: | ||||||
| 
 | 
 | ||||||
| ```diff | ```diff | ||||||
| pipeline: | pipeline: | ||||||
| @ -111,11 +110,11 @@ pipeline: | |||||||
|       - echo "test ssh" |       - echo "test ssh" | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| See the detail of [issue comment](https://github.com/appleboy/drone-ssh/issues/51#issuecomment-336732928). | See details in [this issue comment](https://github.com/appleboy/drone-ssh/issues/51#issuecomment-336732928). | ||||||
| 
 | 
 | ||||||
| ## Configuration | ## Configuration | ||||||
| 
 | 
 | ||||||
| See [DOCS.md](./DOCS.md) for examples and full configuration options | See [DOCS.md](./DOCS.md) for examples and full configuration options. | ||||||
| 
 | 
 | ||||||
| Configuration options are loaded from multiple sources: | Configuration options are loaded from multiple sources: | ||||||
| 
 | 
 | ||||||
| @ -123,4 +122,4 @@ Configuration options are loaded from multiple sources: | |||||||
| 1. From a dotenv file at a path specified by the `PLUGIN_ENV_FILE` environment variable. | 1. From a dotenv file at a path specified by the `PLUGIN_ENV_FILE` environment variable. | ||||||
| 2. From your `.drone.yml` Drone configuration. | 2. From your `.drone.yml` Drone configuration. | ||||||
| 
 | 
 | ||||||
| Later sources override previous sources, i.e. if `PORT` is set in an `.env` file committed in the repository or created by previous test steps, it will override the default set `main.go`. | Later sources override earlier ones. For example, if `PORT` is set in an `.env` file committed in the repository or created by previous test steps, it will override the default set in `main.go`. | ||||||
|  | |||||||
| @ -57,7 +57,7 @@ pipeline: | |||||||
| go install github.com/appleboy/drone-ssh@latest | go install github.com/appleboy/drone-ssh@latest | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| 或使用以下命令自行构建二进制文件: | 或使用以下命令手动构建二进制文件: | ||||||
| 
 | 
 | ||||||
| ```sh | ```sh | ||||||
| export GOOS=linux | export GOOS=linux | ||||||
| @ -95,12 +95,10 @@ docker run --rm \ | |||||||
| 
 | 
 | ||||||
| ## 通过文件路径挂载密钥 | ## 通过文件路径挂载密钥 | ||||||
| 
 | 
 | ||||||
| 请确保已在项目设置中启用 `trusted` 模式(适用于 [drone 0.8 版本](https://0-8-0.docs.drone.io/))。 | 请确保已在项目设置中启用 `trusted` 模式(适用于 [Drone 0.8 版本](https://0-8-0.docs.drone.io/))。 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
| 
 | 
 | ||||||
| <!-- 图片说明:Drone 项目 trusted 模式设置界面 --> |  | ||||||
| 
 |  | ||||||
| 在 `.drone.yml` 配置文件的 `volumes` 部分挂载私钥: | 在 `.drone.yml` 配置文件的 `volumes` 部分挂载私钥: | ||||||
| 
 | 
 | ||||||
| ```diff | ```diff | ||||||
| @ -116,11 +114,11 @@ pipeline: | |||||||
|       - echo "test ssh" |       - echo "test ssh" | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| 详情请参考 [issue comment](https://github.com/appleboy/drone-ssh/issues/51#issuecomment-336732928)。 | 详情请参考 [此 issue comment](https://github.com/appleboy/drone-ssh/issues/51#issuecomment-336732928)。 | ||||||
| 
 | 
 | ||||||
| ## 配置说明 | ## 配置说明 | ||||||
| 
 | 
 | ||||||
| 更多示例和完整配置选项请参考 [DOCS.md](./DOCS.md) | 更多示例和完整配置选项请参考 [DOCS.md](./DOCS.md)。 | ||||||
| 
 | 
 | ||||||
| 配置选项来源如下: | 配置选项来源如下: | ||||||
| 
 | 
 | ||||||
| @ -128,4 +126,4 @@ pipeline: | |||||||
| 1. 由 `PLUGIN_ENV_FILE` 环境变量指定的 dotenv 文件。 | 1. 由 `PLUGIN_ENV_FILE` 环境变量指定的 dotenv 文件。 | ||||||
| 2. `.drone.yml` Drone 配置文件。 | 2. `.drone.yml` Drone 配置文件。 | ||||||
| 
 | 
 | ||||||
| 后面的来源会覆盖前面的设置,例如 `.env` 文件中的 `PORT` 会覆盖 main.go 的默认值。 | 后面的来源会覆盖前面的设置。例如,`.env` 文件中的 `PORT` 会覆盖 main.go 的默认值。 | ||||||
|  | |||||||
| @ -57,7 +57,7 @@ pipeline: | |||||||
| go install github.com/appleboy/drone-ssh@latest | go install github.com/appleboy/drone-ssh@latest | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| 或使用下列指令自行建置執行檔: | 或使用下列指令手動建置執行檔: | ||||||
| 
 | 
 | ||||||
| ```sh | ```sh | ||||||
| export GOOS=linux | export GOOS=linux | ||||||
| @ -95,12 +95,10 @@ docker run --rm \ | |||||||
| 
 | 
 | ||||||
| ## 以檔案路徑掛載金鑰 | ## 以檔案路徑掛載金鑰 | ||||||
| 
 | 
 | ||||||
| 請確認已於專案設定中啟用 `trusted` 模式(適用於 [drone 0.8 版本](https://0-8-0.docs.drone.io/))。 | 請確認已於專案設定中啟用 `trusted` 模式(適用於 [Drone 0.8 版本](https://0-8-0.docs.drone.io/))。 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
| 
 | 
 | ||||||
| <!-- 圖片說明:Drone 專案 trusted 模式設定畫面 --> |  | ||||||
| 
 |  | ||||||
| 於 `.drone.yml` 設定檔的 `volumes` 區段掛載私鑰: | 於 `.drone.yml` 設定檔的 `volumes` 區段掛載私鑰: | ||||||
| 
 | 
 | ||||||
| ```diff | ```diff | ||||||
| @ -116,11 +114,11 @@ pipeline: | |||||||
|       - echo "test ssh" |       - echo "test ssh" | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| 詳情請參考 [issue comment](https://github.com/appleboy/drone-ssh/issues/51#issuecomment-336732928)。 | 詳情請參考 [此 issue comment](https://github.com/appleboy/drone-ssh/issues/51#issuecomment-336732928)。 | ||||||
| 
 | 
 | ||||||
| ## 設定說明 | ## 設定說明 | ||||||
| 
 | 
 | ||||||
| 更多範例與完整設定選項請參考 [DOCS.md](./DOCS.md) | 更多範例與完整設定選項請參考 [DOCS.md](./DOCS.md)。 | ||||||
| 
 | 
 | ||||||
| 設定選項來源如下: | 設定選項來源如下: | ||||||
| 
 | 
 | ||||||
| @ -128,4 +126,4 @@ pipeline: | |||||||
| 1. 由 `PLUGIN_ENV_FILE` 環境變數指定的 dotenv 檔案。 | 1. 由 `PLUGIN_ENV_FILE` 環境變數指定的 dotenv 檔案。 | ||||||
| 2. `.drone.yml` Drone 設定檔。 | 2. `.drone.yml` Drone 設定檔。 | ||||||
| 
 | 
 | ||||||
| 後面的來源會覆蓋前面的設定,例如 `.env` 檔案中的 `PORT` 會覆蓋 main.go 的預設值。 | 後面的來源會覆蓋前面的設定。例如,`.env` 檔案中的 `PORT` 會覆蓋 main.go 的預設值。 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 appleboy
						appleboy