百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

git-deploy

> DevOps
开源

git-deploy 是一个部署工具,可基于 git 存储库中的更改进行快速、简单的部署。

167 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

git-deploy 是一个部署工具,可基于 git 存储库中的更改进行快速、简单的部署。

= git-deploy

= Description

git-deploy is a deployment tool to allow for quick and easy deployments based on the changes in a git repository.

It was originally used to update multiple WordPress installations on shared hosting environments. Ideally Capistrano would have been the perfect tool, but generally shared hosting environments only allow for FTP access, which Capistrano does not support. Likewise rather than using a standard FTP program, when doing a deployment, I only need to upload the files that have been changed. This saves me both time and bandwidth.

I needed something like Capistrano, but simpler.

git-deploy supports deployment over SSH and FTP.

= Installation

git-deploy requires the Ruby gems net-ssh, net-sftp, net-scp.

You can install them like so:

sudo gem install net-ssh net-sftp net-scp

= Usage

In the root directory of your source code, create a deploy.yml file.

Here is a sample code:

'ftp://example:[email protected]:21/path/to/installation': skip: false

You use the URI scheme to define the location of your installation. If you do not want to use the URI scheme, and instead use another identifier. Feel free to do so. Just enter the settings for the host like so:

'example': skip: false scheme: ftp user: example password: password host: example.com port: 21 path: /path/to/installation overwrite_if_same_revision: true

Note: The port field is optional in both the URI scheme and the broken down options

Once you have done creating the deploy.yml, upload to your server a file called +REVISION+ with the revision string for the current revision residing on the server

After you have commited your code to the repository. You can run

git deploy

== Additional Keys

The configuration for a site has additional and optional options:

  • skip: +true+ or +false+ (default). Whether to skip the configuration
  • debug_mode: +true+ or +false+ (default). For FTP only. Outputs debugging information
  • passive: +true+ or +false+ (default). For FTP only. Enable passive connection.
  • local_path: string. Only consider files to upload in a particular local path.

= How It Works

git-deploy stores file called +REVISION+ on your server inside the root path to your application. This file stores the current revision of your application residing on your server.

When you run a git deploy, git-deploy downloads the +REVISION+ file, and checks to see what files are different between revisions and either upload the changed files or deletes them from the server.

= TODO

  • Create a Ruby gem for the script. Sadly gem-deploy was taken.

Issues· 12 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubydeploygit

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理