Update docs build for non-multiversion

This job was not building/syncing all repos, due to an issue with
sphinx-multiversion. However, multiversion builds are not necessary,
so we will just build the branch to which a change is merged.

Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Change-Id: I95348baf919516d96fee3b98db47f67d86178fc9
diff --git a/jjb/shell/sync-dir.sh b/jjb/shell/sync-dir.sh
index 1623834..07f4d72 100644
--- a/jjb/shell/sync-dir.sh
+++ b/jjb/shell/sync-dir.sh
@@ -25,4 +25,8 @@
 $BUILD_COMMAND
 
 # sync the files to the target
-rsync -rvzh --delete-after --exclude=.git "$WORKSPACE/$BUILD_OUTPUT_PATH" "$SYNC_TARGET_SERVER:$SYNC_TARGET_PATH"
+rsync -rvzh --delete-after --exclude=.git "$WORKSPACE/$BUILD_OUTPUT_PATH/$GERRIT_BRANCH" \
+    "$SYNC_TARGET_SERVER:$SYNC_TARGET_PATH/$GERRIT_BRANCH"
+# Parent dir index.html will only be created on master build.
+rsync -vzh "$WORKSPACE/$BUILD_OUTPUT/index.html" \
+    "$SYNC_TARGET_SERVER:$SYNC_TARGET_PATH/index.html" || true