aws-amplify / aws-amplify/amplify-hosting
How to have custom build actions on amplify publish?
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
I'm using angular, and I'm curious if it's possible to specify the build action be --prod when i'm publishing manually to my prod amplify environment? (publishing manually being, no CICD setup through amplify, but just doing the command `amplify publish`)
The use case: I have a prod environments file and a dev one. Every time i do `amplify publish`, it builds the project using `ng build`. By default, `ng build` uses the dev environments file. Ideally I would like something like amplify publish --prod where it would kick off the ng build --prod command, which would automatically use the prod environments file.
Otherwise my manual work around is replacing environment variables so that my publish command is publishing the right variables when publish manually to my prod amplify environment. So anyway, is there any kind of switch like this available? Or some other way I can achieve what I need? Thanks!
Contributor guide
Research direction
Start with the manual `amplify publish` flow and the Angular build command described in the issue; compare available build configuration options for selecting `ng build --prod`. Done means a confirmed supported workflow or a clearly scoped feature request, with the production environment used without manual variable replacement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, aws
- Domain
- build-system, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100