CircleCI 部署看起来成功,但退出时代码为 1?

Spa*_*000 8 amazon-s3 continuous-deployment circleci storybook

我有一个 Circleci 配置,它运行一个脚本来部署故事书网站。它本质上是cd进入我的前端 monorepo 包,运行yarn install,构建故事书并将其同步到 S3 存储桶。

(编辑一些内容,例如包和文件的名称)

它在我的圈子配置文件中启动了一个 with 作业:

deploy-package-storybook:
    <<: *defaults
    working_directory: ~/root

    steps:
      - checkout
      - <<: *install_aws
      - attach_workspace:
          at: ~/
      - run:
          name: Deploy Storybook
          command: |
            ~/root/bin/deploy-storybook.sh PACKAGE
Run Code Online (Sandbox Code Playgroud)

该脚本如下所示:

echo "${CYAN}deploying storybook\n"
cd packages/${TAG}
yarn build-storybook
aws s3 sync ./artifacts/storybook s3://storybook.website.us/${TAG} --delete || slack_alert storybook-deploy-fail
slack_alert "deploy-storybook-success"
Run Code Online (Sandbox Code Playgroud)

当它在 Circle 中运行时,它似乎完成了同步,甚至向我的频道发送了一条已成功部署的松弛警报,但在最后,它显示了以下内容:

upload: artifacts/storybook/vendors~main.8c562e1c344f6a5f2073.bundle.js to s3://storybook.website.us/package/vendors~main.8c562e1c344f6a5f2073.bundle.js
0
ok

Exited with code exit status 1
CircleCI received exit code 1
Run Code Online (Sandbox Code Playgroud)

但是我不完全确定它为什么这样做。已经成功同步了,应该会通过吧?

我做过的事情:

我尝试添加一个--debug标志,aws s3 sync如下所示:

aws s3 sync ./artifacts/storybook s3://storybook.website.us/${TAG} --delete --debug
Run Code Online (Sandbox Code Playgroud)

它返回如下:

2020-03-16 13:14:28,349 - ThreadPoolExecutor-0_2 - botocore.hooks - DEBUG - Event needs-retry.s3.PutObject: calling handler <botocore.retryhandler.RetryHandler object at 0x7fcc35212dd0>
2020-03-16 13:14:28,349 - ThreadPoolExecutor-0_2 - botocore.retryhandler - DEBUG - No retry needed.
2020-03-16 13:14:28,350 - ThreadPoolExecutor-0_2 - botocore.hooks - DEBUG - Event needs-retry.s3.PutObject: calling handler <bound method S3RegionRedirector.redirect_from_error of <botocore.utils.S3RegionRedirector object at 0x7fcc35212e10>>
2020-03-16 13:14:28,350 - ThreadPoolExecutor-0_2 - botocore.hooks - DEBUG - Event after-call.s3.PutObject: calling handler <function enhance_error_msg at 0x7fcc35c79320>
2020-03-16 13:14:28,350 - ThreadPoolExecutor-0_2 - s3transfer.utils - DEBUG - Releasing acquire 34/None
upload: artifacts/storybook/vendors~main.5f43fbfd82bbe3ed3177.bundle.js to s3://storybook.website.us/package/vendors~main.5f43fbfd82bbe3ed3177.bundle.js
2020-03-16 13:14:28,365 - Thread-1 - awscli.customizations.s3.results - DEBUG - Shutdown request received in result processing thread, shutting down result thread.
0
ok

Exited with code exit status 1
CircleCI received exit code 1
Run Code Online (Sandbox Code Playgroud)

这不是我的专业领域,所以我真的不知道如何处理此类错误。有人可以帮忙吗?