Add a condition around the Javadoc API copying to avoid stopping the script.

(cherry picked from commit d3375d09091cc59b7b550c1e244e4825e2ccb70d)
diff --git a/generate-site.sh b/generate-site.sh
index 21cce32..6dcf2fb 100755
--- a/generate-site.sh
+++ b/generate-site.sh
@@ -57,6 +57,8 @@
 fi
 mkdir -p target/staging/unomi-api
 mkdir -p target/staging/manual
-cp -R target/site/apidocs target/staging/unomi-api
+if [ "$LOCAL_BRANCH_NAME" == "master" ]; then
+  cp -R target/site/apidocs target/staging/unomi-api
+fi
 cp -Rf manual/target/generated-docs/html/* target/staging/manual
 echo Documentation generation completed!