Created
August 21, 2024 17:48
-
-
Save salihgueler/565de2c98c2db90e7c815604a6afed42 to your computer and use it in GitHub Desktop.
Deploy Flutter Applications through Amplify Hosting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 1 | |
backend: | |
phases: | |
build: | |
commands: | |
- npm ci --cache .npm --prefer-offline | |
- npx ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID --outputs-format dart --outputs-out-dir lib | |
frontend: | |
phases: | |
preBuild: | |
commands: | |
- echo "Installing Flutter SDK" | |
- git clone https://github.com/flutter/flutter.git -b stable --depth 1 | |
- export PATH="$PATH:$(pwd)/flutter/bin" | |
- flutter config --no-analytics | |
- flutter doctor | |
build: | |
commands: | |
- echo "Installing dependencies" | |
- flutter pub get | |
- echo "Building Flutter web application with WASM support" | |
- flutter build web | |
artifacts: | |
baseDirectory: build/web | |
files: | |
- '**/*' | |
cache: | |
paths: | |
- flutter/.pub-cache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment