irongit
RealE-state/buildspec.yml
28 lines708 BYAML
1version: 0.2
2
3env:
4 variables:
5 REACT_APP_BASE_URL: "http://localhost:5001/"
6
7phases:
8 install:
9 commands:
10 # Install Node.js and npm (or you can use the pre-configured Node environment in CodeBuild)
11 echo Installing dependencies...
12 npm install -g npm@latest
13
14 build:
15 commands:
16 - cd Client
17 - echo Running npm run build in the Client folder...
18 - npm install # Make sure all dependencies are installed
19 - npm run build
20
21 post_build:
22 commands:
23 # Copy the build output to your S3 bucket
24 echo Copying build files to S3 bucket...
25 aws s3 sync ./Client/build/ s3://your-s3-bucket-name/ --delete
26artifacts:
27 files:
28 - Client/node_modules