执行部署
(config, manual_branch, manual_commit, deploy_mode)
| 342 | return None, None, None, None, None |
| 343 | |
| 344 | def execute_deployment(config, manual_branch, manual_commit, deploy_mode): |
| 345 | """执行部署""" |
| 346 | deploy_type = config.get('type', 'site') |
| 347 | |
| 348 | if deploy_type == 'site': |
| 349 | if deploy_mode == 1: |
| 350 | return auto_deploy(config) |
| 351 | elif deploy_mode == 2: |
| 352 | return manual_branch_deploy(config, manual_branch) |
| 353 | elif deploy_mode == 3: |
| 354 | return manual_rollback_deploy(config, manual_branch, manual_commit) |
| 355 | elif deploy_type == 'project': |
| 356 | log("项目类型部署,跳过...") |
| 357 | return True, "" |
| 358 | else: |
| 359 | log(f"未知部署类型: {deploy_type}", "❌") |
| 360 | return False, f"未知部署类型: {deploy_type}" |
| 361 | |
| 362 | if __name__ == '__main__': |
| 363 | # 记录开始时间 |
no test coverage detected