Set Cache-Control: no-cache on HTML, XML, and main.css in docgen (#3020)

When docgen uploads `bazel-blog` to `gs://blog.bazel.build` without
explicit `Cache-Control` metadata, Google Cloud Storage defaults to
`Cache-Control: public, max-age=3600` on all publicly readable objects.
This causes Google Front End edge caches and browsers to serve stale
HTML and stylesheet responses for up to an hour after a deployment.

Split the upload into two `gcloud storage rsync` passes so static assets
(`images/`, `assets/`) keep a 1-hour cache (`public, max-age=3600`),
while HTML pages, RSS feeds, and `css/main.css` use `Cache-Control:
no-cache` and revalidate via `ETag`. Also run `gcloud storage objects
update` so existing HTML, XML, and `css/main.css` objects in the bucket
whose checksums did not change pick up `Cache-Control: no-cache`
immediately.

Co-authored-by: Salma Samy <16399431+SalmaSamy@users.noreply.github.com>
1 file changed