enrise / travisdeployer
此包已被废弃,不再维护。没有建议的替代包。
将Deployer与Travis-CI结合,当分支合并时自动部署。
v0.2.1-alpha.1
2016-06-17 19:15 UTC
Requires
- php: >=5.4
- symfony/yaml: ^2.7|^3.0
Requires (Dev)
This package is not auto-updated.
Last update: 2022-10-21 11:52:38 UTC
README
这是一个不再使用或维护的旧仓库。我们建议不再使用此仓库。
原始README如下
TravisDeployer
将Deployer与Travis-CI结合,在分支合并并通过构建后自动部署。
期望
首先,我们期望你已经准备好了以下内容
- 项目根目录中设置了如Deployer文档中所述的
deploy.php
。 - Travis-CI已启用,并在项目根目录中有
.travis.yml
文件。 - 你有composer来加载PHP依赖项。
安装
- 使用以下命令将TravisDeployer添加到你的项目中:
composer require enrise/travisdeployer
- 将以下代码添加到你的
.travis.yml
中
travisdeployer: # our deployer config verbose: false # verbose output the deployment? branches: # what branches do you want to deploy? develop: develop # deploys stage develop when merging into develop master: production # deploys stage production when merging into master after_success: # after your build succeeded (tests passed) - vendor/bin/travisdeployer # Trigger the travis deployer
你可以自定义分支,以及是否要部署详细内容。
部署
现在每次你将代码推送到你的分支,并且travis-ci构建成功时,TravisDeployer部署脚本将被触发。该脚本将在以下情况下部署:
- 构建结果为绿色
- 构建不是PR
- 推送到的分支在分支列表中(由travis配置提供)
如果所有条件都匹配,Deployer将被下载到你的构建中,并将你的代码部署到你的服务器。部署过程中发生的事情是你项目根目录中的deploy.php
(Deployer配置)中配置的内容。
===
TravisDeployer由Rick van der Staaij和Stefan van Essen提供。