Created
June 19, 2025 15:36
-
-
Save jinnatul/34ade5ec538be108fc124f3f0a29cf3b to your computer and use it in GitHub Desktop.
Deploy multiple branches in AWS Amplify using different build commands.
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 | |
| frontend: | |
| phases: | |
| preBuild: | |
| commands: | |
| - npm install | |
| build: | |
| commands: | |
| - if [ "${AWS_BRANCH}" = "main" ]; then npm run build:prod; fi | |
| - if [ "${AWS_BRANCH}" = "develop" ]; then npm run build:dev; fi | |
| artifacts: | |
| baseDirectory: .next | |
| files: | |
| - '**/*' | |
| cache: | |
| paths: | |
| - .next/cache/**/* | |
| - node_modules/**/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment