An open API service indexing awesome lists of open source software.

https://github.com/pengng/auto-deploy-service

An automatic pull commit of the server. After the deployment of the project commit, the automatic pull down.
https://github.com/pengng/auto-deploy-service

deploy githook webhook

Last synced: 5 months ago
JSON representation

An automatic pull commit of the server. After the deployment of the project commit, the automatic pull down.

Awesome Lists containing this project

README

          

# auto-deploy-service
自动部署服务。用于搭配`webhook`使用,当`push`新的`commit`到仓库时,服务端自动部署最新代码。

### 使用说明

```shell
npm install -g auto-deploy-service
---
auto-deploy-service -C config.json
```

### 命令参数

- -V --version 查看当前版本
- -h --help 查看帮助
- -C --config [file] 启动配置文件
- log 显示日志

### 配置文件参数

| 名称 | 类型 | 必填 | 描述 |
| --- | --- | --- | --- |
| port | Number | 是 | 指定服务启动使用的端口号,默认为4000。 |
| repository | Array | 是 | 指定管理的子项目。 |

##### repository 数组

| 名称 | 类型 | 必填 | 描述 |
| --- | --- | --- | --- |
| dir | String | 是 | 项目的根目录路径。 |
| token | String | 是 | Webhook的token。 |

##### config.json 示例

```json
{
"port": 3399,
"repository": [
{
"dir": "/home/project/xxx",
"token": "xxx"
}
]
}
```