我想进行AWS Elastic Beanstalk部署。但是tvavis说“无法解析” 在添加了以“ deploy”一词开头的代码部分之后,就会发生这种情况
sudo: required
services:
- docker
before_install:
- docker build -t alex-sbk/docker-react -f Dockerfile.dev .
script:
- docker run -e CI=true alex-sbk/docker-react npm run test
deploy:
provider: elasticbeanstalk
region: "us-east-2"
app: "docker-react"
env: "DockerReact-env"
bucket_name: "elasticbeanstalk-us-east-2-282895571233"
bucket_path: "docker-react"
on:
branch: master
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_SECRET_KEY
答案 0 :(得分:0)
缩进存在明显问题。您的代码未通过 YAML格式验证器。我修复了一下,现在通过了
---
before_install:
- "docker build -t alex-sbk/docker-react -f Dockerfile.dev ."
script:
- "docker run -e CI=true alex-sbk/docker-react npm run test"
-
deploy:
access_key_id: $AWS_ACCESS_KEY
app: docker-react
bucket_name: elasticbeanstalk-us-east-2-282895571233
bucket_path: docker-react
env: DockerReact-env
provider: elasticbeanstalk
region: us-east-2
secret_access_key: $AWS_SECRET_KEY
true:
branch: master
services:
- docker
sudo: required
该格式现在应该可以,但是我不能保证部署会成功。提供的实际数据可能还有其他问题。