deploy: add update-traffic command to frontend deploy

To match the private repo, added an additional step to the
public deploy script.

Change-Id: I5f5a9eae698318e0777ff1223dff3a3305be132a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/367594
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
diff --git a/deploy/frontend.sh b/deploy/frontend.sh
index 9dbf954..aa0c275 100755
--- a/deploy/frontend.sh
+++ b/deploy/frontend.sh
@@ -25,6 +25,10 @@
   check_env $env
   check_image $image
   gcloud run deploy --quiet --region us-central1 $env-frontend --image $image
+  # If there was a rollback, `gcloud run deploy` will create a revision but
+  # not point traffic to it. The following command ensures that the new revision
+  # will get traffic.
+  gcloud run services update-traffic $env-frontend --to-latest
   local tok=$(private/devtools/idtoken.sh $env)
   local hdr="Authorization: Bearer $tok"
   # Clear the redis cache