I went down a bit of rabbit hole today, to the point where I was about to send a PR to the laravel/vapor-cli repository.
If I run vapor deploy staging locally, and I have this in .env:
And this in .env.staging:
Then mix is going to build `process.env.MIX_STRIPE_KEY` with a value of `pk_test`.
My line of thinking is I need the Vapor build to use my .env.staging file to build those assets, damnit!
Alas, there is a better solution, mix-env-file.
The steps are as follows, replace "staging" with your environment of choice:
Even better, this works very easily with a Continuous Integration service like CircleCI: in your vapor.yml build steps, just pull the correct .env as above prior to building assets and your done.