diff --git a/.ostc-ci/gitlab-ci.yml b/.ostc-ci/gitlab-ci.yml
index 875112cecd58d57c368f4b8d2a761d32dcecc11d..39e9667a73444ffd4fc295e3dea8c53c756a7c03 100644
--- a/.ostc-ci/gitlab-ci.yml
+++ b/.ostc-ci/gitlab-ci.yml
@@ -76,7 +76,7 @@ update-docs:
   trigger: OSTC/OHOS/docs
   rules:
     # Update the documentation when things land in the default branch.
-    - if: '$CI_BRANCH_NAME == $CI_DEFAULT_BRANCH'
+    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
       changes:
         # React to changes to the docs directory.
         - docs/**/*