ci: conditional checks depending on source code changes (#9731)
### Description
We're running every check for every PR, and it's making us slower,
particularly when the longest tests run for a docs change. This PR is to
make sure we only run what we need.