I'm using Bitbucket pipelines to deploy my react app to the s3 bucket, deployments work fine but unfortunately, my `process.env ` variables are undefined. I already add my all env variables in deployment variables.
bitbucket-pipeline.yml
<span>image</span>: <span>node</span>:<span>14</span>
<span>pipelines</span>:
<span>branches</span>:
<span>master</span>:
- <span>parallel</span>:
- <span>step</span>:
<span>name</span>: <span>Build</span> and <span>Test</span>
<span>caches</span>:
- node
<span>script</span>:
- rm -rf package-lock.<span>json</span>
- npm install
- npm rebuild node-sass
- <span>CI</span>=<span>false</span> npm run <span>build</span>:prod
<span>artifacts</span>:
- build<span>/**
- step:
name: Security Scan
script:
# See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&category=security
- pipe: atlassian/git-secrets-scan:0.5.1
- step:
name: Deploy to Production
deployment: Production
trigger: manual
clone:
enabled: false
script:
# sync your files to S3
- pipe: atlassian/aws-s3-deploy:1.1.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
S3_BUCKET: $S3_BUCKET
LOCAL_PATH: 'build'</span>