The deployment workflow for Trellis will compile Sage assets from local files, and use them for deployment, regardless of which environment is being deployed to.
Our git setup is essentially this:
- master branch (always deploy to ‘production’ environment)
- staging branch (always deploy to ‘staging’ environment)
- development branches (any number of feature branches, to merge into staging then master)
ie. In the scenario that someone wants to deploy to ‘staging’ with Trellis, once files are committed to the staging repo, that person then also needs to make sure they switch their local branch to match staging prior to deployment, otherwise the incorrect assets will be deployed.
Is this perhaps a workflow that might be reconsidered, or should we simply make sure anyone making a deploy ensures their local assets are match the repo branch that is being deployed?
To me it could be a bit error prone, but just wondering if its in your line of sight.