diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index 157a201..36e0793 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -21,6 +21,12 @@ set -u
 set -o pipefail
 set -x
 
+# yocto-docs reads this variable to perform stricter checks to make sure
+# everything is setup correctly for building the docs. This ensures that docs
+# are built correctly before publishing them. See how it is used in yocto-docs
+# directly.
+export AUTOBUILDER_BUILD=1
+
 builddir=$(realpath "$1")
 ypdocs=$(realpath "$2/documentation/")
 bbdocs=$(realpath "$3/doc/")
