[sdk] Use rsync instead of cp to upload dartdoc (main branch)

gsutil cp behaves differently if the directory already exists causing
the latest folder to have a gen-dartdocs subfolder instead of being
replaced.

gsutil rsync doesn't have this problem and also removes extra files.

Similar to https://dart-review.googlesource.com/c/recipes/+/373700 but for the main branch.

Bug: b/320447980
Change-Id: Ie75576dda469352c962075de95e822fbfc62e275
Reviewed-on: https://dart-review.googlesource.com/c/recipes/+/373702
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
2 files changed