Commit_ref is null if the deploy was via a build hook

Hi @davidsneal and welcome to our community!

Yes, $COMMIT_REF and other git-related variables will be null unless the build is triggered directly from git. We do clone the repo - so you can use commands like git status etc, to check what commit is in use. Some more advanced workflow around skipping builds based on git details are demonstrated in this thread, which you’ll probably find interesting.