cmd/upspin-deploy-gcp: copy entire doc directory when deploying frontend

This fixes the broken images in arch.md.

Change-Id: Ibc8cdf1d9d875659114ee23063886e57d4b0d013
Reviewed-on: https://upspin-review.googlesource.com/12000
Reviewed-by: Rob Pike <r@golang.org>
diff --git a/cmd/upspin-deploy-gcp/main.go b/cmd/upspin-deploy-gcp/main.go
index 510e89e..d0d03af 100644
--- a/cmd/upspin-deploy-gcp/main.go
+++ b/cmd/upspin-deploy-gcp/main.go
@@ -664,13 +664,20 @@
 	}
 
 	if pkgPath == "gcp.upspin.io/cmd/frontend-gcp" {
-		gopath := build.Default.GOPATH
 		// Copy frontend dependencies not listed by `go list`.
-		for _, dir := range []string{"doc", "doc/images", "doc/templates"} {
-			s := fmt.Sprintf("%s %s\n",
-				filepath.Join("upspin.io", dir),
-				filepath.Join(gopath, "src/upspin.io", dir))
-			out = append(out, s...)
+		gopath := build.Default.GOPATH
+		root := filepath.Join(gopath, "src/upspin.io", "doc")
+		err := filepath.Walk(root, func(dir string, fi os.FileInfo, _ error) error {
+			if !fi.IsDir() {
+				return nil
+			}
+			tail := strings.TrimPrefix(dir, root)
+			pkg := filepath.Join("upspin.io", "doc", tail)
+			out = append(out, fmt.Sprintf("%s %s\n", pkg, dir)...)
+			return nil
+		})
+		if err != nil {
+			return err
 		}
 	}