Minor improvements
We don't really need to run pre-commit on the main branch since we run it everywhere else and main is protected, and we don't need to deploy to the test environment for the main branch. This should save us at least a bit of time, and free up more runners for other jobs.
Edited by Anders Lindh Olsson