version: 1 applications: - appRoot: docs frontend: phases: preBuild: commands: - rm -rf node_modules - nvm install 16.13 # NodeJS 16.13+ is the latest version that Amplify Hosting supports - nvm use 16 - node -v - export FLUTTER_HOME=${HOME}/sdks/flutter # pin to flutter v3.10.6 - git clone -b 3.10.6 --depth 1 https://github.com/flutter/flutter.git ${FLUTTER_HOME} - export PATH="$PATH:${FLUTTER_HOME}/bin" # Skip cypress binary installation, as it's unneeded for docs and often fails transiently # https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation - export CYPRESS_INSTALL_BINARY=0 - (cd .. && yarn install && yarn build) build: commands: - nvm install 16.13 - nvm use 16 - node -v - yarn flutter:build - yarn build artifacts: baseDirectory: .next files: - '**/*'