Read-only variables
These variables are pre-defined for both Builds and Preview environments. They are set automatically and cannot be changed. You can reference them in yourgatsby-config.jsor anywhere else you would normally reference an environment variable.
BRANCH:The name of the current git branch. Useful for swapping environment variables depending on the branch.CI:Alwaystrue.GATSBY_CLOUD:Alwaystrue. Useful for checking if your build is running on Gatsby Cloud.
This is what gatsby cloud doc said.
but when I print out console for the process.env.BRANCH, it was undefined while process.env.GATSBY_CLOUD is true as expected.
Any help is welcomed.