pipelines:
branches: # Branch-specific pipelines definitions
master:
- step:
name: Build and test the app
image: node:latest
script:
- npm install
- npm run test
- npm run build
production:
- step:
name: Building the app
image: node:latest
script:
- npm install
- npm run build
artifacts:
- build/**
- step:
name: Deploying the app to S3
deployment: production
script:
- pipe: atlassian/aws-s3-deploy:0.2.4
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
CREATE_S3_BUCKET: "myreact-s3"
ACL: "public-read"
LOCAL_PATH: "build"
I use this file