我想做AWS弹性Beanstalk部署。但是tvavis说";无法解析";这发生在添加以单词"开头的代码部分之后;部署";
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
缩进存在明显问题。您的代码没有通过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
格式现在应该可以了,但我不能保证部署会成功。所提供的实际数据可能还有其他问题。