Continuous integration Gitlab CD/CI:用户提供的路径生成/不存在

Continuous integration Gitlab CD/CI:用户提供的路径生成/不存在,continuous-integration,gitlab,yaml,continuous-deployment,Continuous Integration,Gitlab,Yaml,Continuous Deployment,我为实践gitlab的CI/CD管道创建了一个简单的react。我有三份关于CD/CI管道的工作。首先测试应用程序,然后构建,然后部署到AWS的S3存储桶。在成功通过测试并运行构建生产之后,当它进入部署阶段时,我得到了以下错误:用户提供的路径构建不存在。我不知道如何在Gitlab的cd/ci管道中创建路径。 这是我的gitlab的.gitlab ci.yml文件设置 image: 'node:12' stages: - test - build - deploy test: s

我为实践gitlab的CI/CD管道创建了一个简单的react。我有三份关于
CD/CI
管道的工作。首先测试应用程序,然后构建,然后部署到AWS的S3存储桶。在成功通过测试并运行构建生产之后,当它进入部署阶段时,我得到了以下错误:
用户提供的路径构建不存在。
我不知道如何在
Gitlab的cd/ci管道中创建路径。

这是我的gitlab的
.gitlab ci.yml
文件设置

image: 'node:12'
stages:
  - test
  - build
  - deploy

test:
  stage: test
  script:
    - yarn install
    - yarn run test

variables:
  AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
  AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
  AWS_REGION: $AWS_REGION
  S3_BUCKET_NAME: $S3_BUCKET_NAME

build:
  stage: build
  only:
    - master
  script:
    - npm install
    - npm run build

deploy:
  stage: deploy
  only:
    - master
  image: python:latest
  script:
     - pip install awscli
     - aws s3 cp build/ s3://$S3_BUCKET_NAME/ --recursive --include "*" 

如果
build/
文件夹是作为
build
阶段的一部分创建的,则应将其作为人工制品传递到
deploy
阶段,并且
deploy
应使用以下方法引用
build
阶段:

build:
  stage: build
  only:
    - master
  script:
    - npm install
    - npm run build
  artifacts:
    paths:
      - build/

deploy:
  stage: deploy
  only:
    - master
  image: python:latest
  dependencies:
    - build
  script:
     - pip install awscli
     - aws s3 cp build/ s3://$S3_BUCKET_NAME/ --recursive --include "*"