Below is a simple solution that actually works. Google's documentation is far overcomplicated and of little use. And their "tech support" was not able to resolve the issue.

This is how I was able to update my static site on gcloud using the command line utility.

  • Create a new bucket, ideally name it with a version like appname-v2
  • Copy your recent build into that bucket
  • Delete the old bucket
  • From your main area in your console where you see your app's directory do gsutil rsync -r gs://[bucketname] ./appname
  • cd into the directory
  • run gcloud app deploy

So if your latest version of your app is 3, if your app's directory is stackoverflow, and your bucket is "bucket" then your gsutil command would look like

gsutil rsync -r gs://bucket-v3 ./stackoverflow

Gcloud console - shows naming for bucket's version

enter image description here

Deployed site - test

enter image description here

There are plenty of related questions, they drone on and on and on about "cache" etc. It's all pointless to read. Just delete the old bucket and redeploy.

Of course this was for a small app, there are ways to "properly do it" but good luck finding it in the documentation. Everyone that I know that works with gcloud has several workarounds.

Related Query

More Query from same tag