阅读(4048) (7)

Laravel 8 Stories

2021-07-08 16:55:56 更新

Stories 将一组任务分组在一个方便的名称下,允许您将小型,集中的任务分组到大型任务中。 例如, deploy 故事可以通过在其定义中列出任务名称来运行 gitcomposer 任务:

@servers(['web' => '192.168.1.1'])

@story('deploy')
    git
    composer
@endstory

@task('git')
    git pull origin master
@endtask

@task('composer')
    composer install
@endtask 

一旦编写了 story ,你可以像一个典型的任务一样运行它:

envoy run deploy