Docs: build perfetto.dev with JS and add autopush

This CL achieves two goals:
1. Rewrites the build rules for the docs site using
   a custom JS script, similar to what we did recently
   for ui.perfetto.dev. This makes testing local docs
   changes easier. Previously it required the cloud SDK
   and caused problems to many devs.
2. Allows autopushing via Cloud Build, using the same
   plan of go/perfetto-ui-autopush.

Bug: 179864115
Change-Id: I28906d18b3591a0e94f31e6c16ce15710be851c1
diff --git a/tools/install-build-deps b/tools/install-build-deps
index 581758e..6f5ceec 100755
--- a/tools/install-build-deps
+++ b/tools/install-build-deps
@@ -462,6 +462,7 @@
   parser.add_argument('--android', action='store_true')
   parser.add_argument('--ui', action='store_true')
   parser.add_argument('--check-only')
+  parser.add_argument('--filter', default='')
   parser.add_argument('--verify', help='Check all URLs', action='store_true')
   args = parser.parse_args()
   if args.verify:
@@ -482,6 +483,8 @@
     if (dep.target_platform != 'all' and
         dep.target_platform != system().lower()):
       continue
+    if args.filter and args.filter not in dep.target_folder:
+      continue
     local_path = os.path.join(ROOT_DIR, dep.target_folder)
     if dep.source_url.endswith('.git'):
       deps_updated |= CheckoutGitRepo(local_path, dep.source_url, dep.checksum,