I have a pipeline on my main branch that deploys to production. It has three key steps: build, deploy, and invalidate cache. All three of these steps are production steps, but I can only put `deployment: production` in one step.
If I put it in the `build` step then the build is correct and has the right configuration, but gets deployed using the incorrect AWS keys and the wrong cache is invalidated.
If I put it in the `deploy` step then the app gets deployed with the right keys, but isn't built for production and doesn't invalidate production cache.
If I put it in the `invalidation` step then the wrong build gets deployed using the wrong keys, but the production cache is invalidated.
I'm not sure why it would be more useful in a single step than in the pipeline itself, so I assume I'm missing some method for referencing deployment variables at the deployment pipeline stage.