What does deploy actually do?

So, I figured out that my issues is that the machine is built in a different environment than the machine is run and I need to use the --build-arg to get env vars into my vite.config.ts , see: Environment variables - #11 by kurt