1. Google CloudCredentials

Click Create a new client ID then select a new Service Account. A JSON file will download. Save it in your project as gcloud.json.

2. Verify siteownership

Google requires you to verify that you own the site in Google Webmaster Tools. There are several ways to do that. If your website is new, most likely you’ll need to create a TXTDNS record with your registrar. Webmaster Tools will guide you throughit.

3. Create a specialbucket

Files on Google Cloud Storage are grouped into “buckets.” A bucket is just a bunch of files that you want to store together. I think of it like it’s own drive. You can have folders under abucket.

The bucket name must be the domain name of your website. So forhttp://symboliclogic.io, the bucket name would be symboliclogic.io. For http://www.symboliclogic.io, the bucket name would bewww.symboliclogic.io.

Be sure to choose Standard storage. The other options are for backups and can take several seconds to be accessible. Standard class storage is fast and suitable forwebsites.

4. Set the default bucketpermissions

You want to make all files public by default. Accomplish this by adding an access rules for allUsers which allowsreading.

Do this for the Default bucket permissions, and the Default objectpermissions.

5. DNS record pointing to yoursite

After verifying ownership of your site, create a new DNS record that points your domain name to Google CloudStorage.

It should be a CNAME type DNS record with the content c.storage.googleapis.com.

6. Upload files to the bucket with a Node.jsscript

First use the tool npm (bundled with Node.js) to install some dependencies into the currentdirectory:

npm install async gcloud glob

Now put the following script at deploy.js then run it from theterminal: