下面是我的 .travis.yml,我正在使用 grunt 编译我的 sass,并最小化似乎可以正常工作的 js 和图像,但是这些文件都没有部署到 Elastic Beanstalk。我skip_cleanup: true
根据文档添加了应该解决此问题的内容,但无济于事。
language: php
before_install:
- nvm install 0.10.38
- npm set progress=false
- npm install -g grunt-cli grunt grunt-bower -loglevel=error
- gem install dpl
script:
- echo "success"
before_deploy:
- cd ${TRAVIS_BUILD_DIR}/wp-content/themes/myapp && npm install --loglevel=error
- cd ${TRAVIS_BUILD_DIR}/wp-content/themes/myapp && grunt build
- cd ${TRAVIS_BUILD_DIR}
- ls ${TRAVIS_BUILD_DIR}/wp-content/themes/myapp
env:
- ELASTIC_BEANSTALK_LABEL=$TRAVIS_COMMIT
deploy:
skip_cleanup: true
provider: elasticbeanstalk
region: us-east-1
app: App
env: app-staging
bucket-name: elasticbeanstalk-us-east-1-AAAAAAAA123
access_key_id: ${STAGING_AWS_ACCESS_KEY_ID}
secret_access_key: ${STAGING_AWS_SECRET_KEY}
on:
branch: staging