| 1 | version: 0.2 |
| 2 | |
| 3 | env: |
| 4 | variables: |
| 5 | REACT_APP_BASE_URL: "http://localhost:5001/" |
| 6 | CLOUDFRONT_ID: "E1VDTBR7TV8GO0" |
| 7 | |
| 8 | phases: |
| 9 | install: |
| 10 | commands: |
| 11 | - echo Installing dependencies... |
| 12 | - cd Client && npm i |
| 13 | |
| 14 | build: |
| 15 | commands: |
| 16 | - cd Client |
| 17 | - echo Running npm run build in the Client folder... |
| 18 | - npm run build |
| 19 | |
| 20 | post_build: |
| 21 | commands: |
| 22 | |
| 23 | - echo Copying build files to S3 bucket... |
| 24 | - aws s3 sync ./Client/build/ "s3://hygo.real-e-state/" --delete |
| 25 | cache: |
| 26 | paths: |
| 27 | - Client/node_modules |
| 28 | - server/node_modules |