Deploying a Simple Static Site

View saved

Static means files only

A static site is HTML, CSS, JavaScript, images, and fonts—no server-side language required. Object storage with website hosting, or a CDN in front of a bucket, is a classic first cloud deploy.

Typical flow

  • Build or write the site files locally
  • Create a bucket or static web app resource in one region
  • Upload files with the CLI or console
  • Enable public read or a CDN endpoint carefully
  • Point a domain with DNS when you are ready

Upload as an illustration

Exact website-hosting flags differ by provider and change over time. The idea is the same: sync a folder to object storage.

# Illustrative sync commands — check current website-hosting steps in docs
# aws s3 sync ./site s3://your-bucket-name/ --delete
# az storage blob upload-batch -d '\$web' -s ./site --account-name YOURACCOUNT
# gcloud storage rsync ./site gs://your-bucket-name --recursive

Harden before going public

Public buckets are easy to misconfigure. Prefer provider static-website features or a CDN that serves only what you intend. Never upload secrets, .env files, or private keys with the site.

Comments

One comment per signed-in account. Comments are saved with this page’s URL.