1 Star 0 Fork 0

geeknonerd/deploy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
bin
.gitignore
History.md
LICENSE
Makefile
README.en.md
README.md
克隆/下载
README.en.md 2.72 KB
一键复制 编辑 原始数据 按行查看 历史
levi 提交于 3年前 . Modify README, fix link error

deploy

Minimalistic deployment shell script, it run in server.

中文文档

The project fork from deploy, the original project put the shell script on the local computer, and remotely executes commands through SSH; this shell script is placed on the remote server for direct execution

Installation

$ make install

Visit the original wiki for additional usage information.

Usage

  Usage: deploy [options] <env> [command]

  Options:

    -C, --chdir <path>   change the working directory to <path>
    -c, --config <path>  set config path. defaults to ./deploy.conf
    -T, --no-tests       ignore test hook
    -V, --version        output program version
    -h, --help           output help information

  Commands:

    setup                run remote setup commands
    revert [n]           revert to [n]th last deployment or 1
    config [key]         output config file or [key]
    curr[ent]            output current release commit
    prev[ious]           output previous release commit
    exec|run <cmd>       execute the given <cmd>
    list                 list previous deploy commits
    [ref]                deploy to [ref], the 'ref' setting, or latest tag

Configuration

By default deploy(1) will look for ./deploy.conf, consisting of one or more environments, [stage], [production], etc, followed by directives.

[stage]
repo git@github.com:visionmedia/express.git
path /var/www/myapp.com
ref origin/master
post-deploy /var/www/myapp.com/update.sh

Directives

ref (optional)

When specified, HEAD is reset to ref. When deploying production typically this will not be used, as deploy(1) will utilize the most recent tag by default, however this is useful for a staging environment, as shown below where HEAD is updated and set to the develop branch.

    ref origin/develop

repo

GIT repository to clone.

   repo git@github.com:visionmedia/express.git

path

Deployment path.

    path /var/www/myapp.com

Hooks

All hooks are arbitrary commands, executed relative to path/current, aka the previous deployment for pre-deploy, and the new deployment for post-deploy. Of course you may specify absolute paths as well.

pre-deploy

  pre-deploy ./bin/something

post-deploy

  post-deploy ./bin/restart

test

Post-deployment test command after post-deploy. If this command fails, deploy(1) will attempt to revert to the previous deployment, ignoring tests (for now), as they are assumed to have run correctly.

  test ./something
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/geeknonerd/deploy.git
git@gitee.com:geeknonerd/deploy.git
geeknonerd
deploy
deploy
master

搜索帮助