PHPackages                             sy-records/git-deploy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. sy-records/git-deploy

ActiveProject[DevOps &amp; Deployment](/categories/devops)

sy-records/git-deploy
=====================

Using WebHooks to automatically pull code.

v1.2.2(2y ago)5161MITPHPPHP &gt;=7.1

Since Jun 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/sy-records/git-deploy)[ Packagist](https://packagist.org/packages/sy-records/git-deploy)[ Fund](https://donate.qq52o.me)[ RSS](/packages/sy-records-git-deploy/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

Git Deploy
==========

[](#git-deploy)

[![Latest Stable Version](https://camo.githubusercontent.com/b93f2461a3ea9670946c6050504af04153f46b9ba5a5be39fba9c2f582c8bad9/68747470733a2f2f706f7365722e707567782e6f72672f73792d7265636f7264732f6769742d6465706c6f792f76)](//packagist.org/packages/sy-records/git-deploy) [![Total Downloads](https://camo.githubusercontent.com/394eff9aa9c4174b044a8b812d89a386f56507873763996362366f799e149f95/68747470733a2f2f706f7365722e707567782e6f72672f73792d7265636f7264732f6769742d6465706c6f792f646f776e6c6f616473)](//packagist.org/packages/sy-records/git-deploy) [![Latest Unstable Version](https://camo.githubusercontent.com/8514e197d7ec5c930a4a07585c1db35a87646f0c268b5b8b813ce51b9331ac12/68747470733a2f2f706f7365722e707567782e6f72672f73792d7265636f7264732f6769742d6465706c6f792f762f756e737461626c65)](//github.com/sy-records/git-deploy)[![License](https://camo.githubusercontent.com/15a605c0bedd22b75de1a07b9424c2cd2cd7be6d8ed24756d46fb2fd1864879a/68747470733a2f2f706f7365722e707567782e6f72672f73792d7265636f7264732f6769742d6465706c6f792f6c6963656e7365)](LICENSE)

🍭 Using WebHooks to automatically pull code.

Support
-------

[](#support)

- GitHub
- Gitee
- Gitea
- GitLab

依赖
--

[](#依赖)

- php &gt;= 7.1
- ext-swoole （可以直接使用 [swoole-cli](https://github.com/swoole/swoole-src/releases/latest)）

安装
--

[](#安装)

```
composer create-project sy-records/git-deploy
```

配置
--

[](#配置)

1. 修改配置文件`config.json`

`server`对应的是`Swoole\Http\Server`的相关配置

- `ip`：IP地址
- `port`：端口
- `mode`：启动模式 `SWOOLE_BASE/SWOOLE_PROCESS`
- `settings`：Server的配置

> 正式运行时需要启动守护进程，将`daemonize`修改为`1`

```
"server": {
  "ip": "0.0.0.0",
  "port": 9666,
  "mode": 1,
  "settings": {
    "worker_num": 1,
    "daemonize": 0
  }
},
```

`sites`对应的是项目的仓库等信息

分为`github`和`gitee`，`key`是仓库名称，支持多个仓库。

- `secret`/`password`：密钥/密码；`github`使用`secret`，`gitee`的 WebHook 密码使用`password`，签名密钥使用`secret`
- `ref`：分支
- `event_name`：事件名称；`github`为`push`，`gitee`为`push_hooks`
- `shells`：需要执行的脚本

```
"sites": {
  "github": {
      "sy-records/git-deploy": {
        "secret": "password",
        "ref": "refs/heads/master",
        "event_name": "push",
        "shells": [
          "git -C /yourpath/git-deploy pull"
        ]
      }
  },
  "gitee": {
      "sy-records/git-deploy": {
        "password": "password",
        "ref": "refs/heads/master",
        "event_name": "push_hooks",
        "shells": [
          "git -C /yourpath/git-deploy pull"
        ]
    }
  },
  "gitea": {
    "sy-records/git-deploy": {
      "secret": "password",
      "ref": "refs/heads/master",
      "event_name": "push",
      "shells": [
        "git -C /yourpath/git-deploy pull"
      ]
    }
  },
  "gitlab": {
    "sy-records/git-deploy": {
      "secret": "password",
      "ref": "refs/heads/master",
      "event_name": "push",
      "shells": [
        "git -C /yourpath/git-deploy pull"
      ]
    }
  }
}
```

2. 填写WebHook

URL：`http://ip:port/github` or `http://ip:port/gitee`

Secret/PassWord：对应`config.json`中的`secret/password`

启动
--

[](#启动)

```
php start.php
```

### systemd

[](#systemd)

```
[Unit]
Description=Git Depoly Service
After=network.target

[Service]
ExecStart=/usr/bin/php /workspace/git-deploy/start.php
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~214 days

Recently: every ~260 days

Total

6

Last Release

1088d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.6

v1.1.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/17615e789eec7042f64c6f4e8733421987d98fcdc4269395b42d2a7f0ae94301?d=identicon)[sy-records](/maintainers/sy-records)

---

Top Contributors

[![sy-records](https://avatars.githubusercontent.com/u/33931153?v=4)](https://github.com/sy-records "sy-records (24 commits)")

---

Tags

giteegithubswoolewebhook

### Embed Badge

![Health badge](/badges/sy-records-git-deploy/health.svg)

```
[![Health](https://phpackages.com/badges/sy-records-git-deploy/health.svg)](https://phpackages.com/packages/sy-records-git-deploy)
```

###  Alternatives

[deployer/deployer

Deployment Tool

11.0k25.4M207](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4674.7k](/packages/tiamo-phpas2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
