Bitbucket ssh 管道失败

Bitbucket ssh pipeline fails

正在尝试处理 2 个分支的管道,但出现配置错误

配置错误 您的 bitbucket-pipelines.yml 在 [pipelines > branches > staging > 1] 处有错误。准确地说:步骤为空、空或缺失。

验证您的 bitbucket-pipelines.yml 查看bitbucket-pipelines.yml

image: node:14
definitions:
  steps:
    - step: &build
       caches:
       - node
       script: 
       - npm install 
       
    - step: &deploy
        name: Deploy to server
        script:
          - echo "Deploying to production environment"
          - pipe: atlassian/ssh-run:0.2.2
            variables:
              SSH_USER: 'ubuntu'
              SERVER: $SERVER_IP
              COMMAND: '/home/ubuntu/backend/cyan/deployment.sh'

pipelines:
  branches:
    staging:
      - step: *build
      - step:
        <<: *deploy
        name: Deploy to production
        deployment: staging
    production:
      - step: *build
      - step:
        <<: *deploy
        name: Deploy to production
        deployment: production

我将不胜感激,因为我刚刚开始使用 bitbucket 管道。

pipelines:
  branches:
    staging:
      - step: *build
      - step:
          <<: *deploy
          name: Deploy to production
          deployment: staging
    production:
      - step: *build
      - step:
          <<: *deploy
          name: Deploy to production
          deployment: production