version: 0.1 frontend: phases: preBuild: commands: - yarn install - node tasks/addLastUpdatedToMdxFiles.js build: commands: - echo "BUILD_ENV=$BUILD_ENV" >> .env.custom - NODE_ENV=production yarn build - if [ "${AWS_BRANCH}" = "main" ]; then node tasks/build-algolia-search.mjs; fi artifacts: # IMPORTANT - Please verify your build output directory baseDirectory: /client/www/next-build files: - '**/*' cache: paths: - node_modules/**/*