Amazon web services Gitlab CI:生成javaScript捆绑包失败。在构建期间-GitLab CI+;AWS s3,cloudfront,gatsby.js
配置AWS和gitLab后,页面部署成功,但每次提交后都会出现以下错误。这个问题的原因可能是什么?下面是我的gitlab-ci.yml和一个错误Amazon web services Gitlab CI:生成javaScript捆绑包失败。在构建期间-GitLab CI+;AWS s3,cloudfront,gatsby.js,amazon-web-services,continuous-integration,gitlab-ci,gatsby,Amazon Web Services,Continuous Integration,Gitlab Ci,Gatsby,配置AWS和gitLab后,页面部署成功,但每次提交后都会出现以下错误。这个问题的原因可能是什么?下面是我的gitlab-ci.yml和一个错误 image: docker:latest stages: - build - deploy build: stage: build image: node:8.11.3 script: - export API_URL="https://xxxxxxxxxxxxxxxxxx.cloudfront.net/"
image: docker:latest
stages:
- build
- deploy
build:
stage: build
image: node:8.11.3
script:
- export API_URL="https://xxxxxxxxxxxxxxxxxx.cloudfront.net/"
- npm install
- npm run build
- echo "BUILD SUCCESSFULLY"
artifacts:
paths:
- public/
expire_in: 20 mins
environment:
name: production
only:
- master
deploy:
stage: deploy
image: python:3.5
dependencies:
- build
script:
- export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
- export AWS_SECRET_ACCESS_KEY=kC0DF4gdVhB2Oahxxxxxxxxxxxxxxxxxxxxxxxxxx1
- export S3_BUCKET_NAME=s3://name-s3s3s3
#- export DISTRIBUTION_ID=$DISTRIBUTION_ID
- pip install awscli --upgrade --user
- export PATH=~/.local/bin:$PATH
- aws s3 sync --acl public-read --delete public $S3_BUCKET_NAME
#- aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths '/*'
- echo "DEPLOYED SUCCESSFULLY"
environment:
name: production
only:
- master