Gitlab CI CD 生产配置未知密钥

Gitlab CI CD Production Config Unkown Keys

Gitlab CI 以下 yml 的 CD 管道失败并出现错误

obs:production config contains unknown keys: type

.gitlab-ci.yml

image: node:latest

before_script:
    - apt-get update -qy
    - apt-get install -y ruby-dev
    - gem install dpl

stages:
    - production

production:
    type: deploy
    stage: production
    image: ruby:latest
    script:
        - dpl --provider=heroku --app=$HEROKU_APP_PRODUCTION --api-key=$HEROKU_API_KEY
    only:
        - main

Job-defined 类型已弃用且 have been removed in GitLab 15。请改用 stage: