Skip to content

This lab demonstrates how to host a static website using Azure Blob Storage. I created and uploaded HTML pages to the special $web container, enabled static website hosting, and tested public access. I then added version control with GitHub and built a PowerShell deployment script to automate future site updates.

Notifications You must be signed in to change notification settings

PrinceCloudOps/azure-static-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Thumbnail (2)

Azure Static Website Deployment (Blob Storage + RBAC + One-Command Deploy)

πŸ”— Live Site: https://ryanstaticwebtrial2323.z13.web.core.windows.net/?v=9
πŸŽ₯ Watch Me Build It!: https://www.loom.com/share/7789d533aaa84e31bfee6b9c0d4aa7b9


πŸ“Œ Overview

This project demonstrates how to host a static website using Azure Blob Storage's static website feature, and how to update the site automatically using a version-controlled deployment script.

This shows understanding of:

  • Cloud object storage
  • Public website hosting on Azure
  • RBAC vs Shared Key (modern access control)
  • CI/CD workflow fundamentals
  • Repeatable deployment automation

This is the production-aligned way to host and maintain static web assets in Azure.


🧱 Architecture

Component Purpose
Storage Account Base resource hosting the website files
$web Container Special container for static website public hosting
Static Website Feature Handles routing for index + 404 pages
Azure CLI Deploy Script Automates updates to the live site
GitHub Version Control Tracks changes and maintains deployment history

πŸ—‚οΈ Project Structure

index.html

  • Main homepage displayed when users visit the site.

404.html

  • Custom error page shown for invalid routes.

deploy.ps1

  • One-command deployment script that uploads updated website files to Azure Blob Storage using Azure CLI + RBAC authentication.

πŸš€ Deploy / Update the Site (One Command)

Step 1 β€” Login to Azure

az login

Step 2 β€” Run the Deploy Script

.\deploy.ps1

This uploads all .html files to the $web container and updates the live site instantly β€” no clicking, no portal uploads.

Script Reference:$STORAGE="ryanstaticwebtrial2323" $DEST='$web'

az storage blob upload-batch --account-name $STORAGE --auth-mode login --destination $DEST --source . --pattern *.html --overwrite

Check Status
Homepage loads βœ”οΈ
404 fallback page works βœ”οΈ
Updates deploy using script βœ”οΈ
No access keys used (RBAC instead) βœ”οΈ

404 Test: https://ryanstaticwebtrial2323.z13.web.core.windows.net/does-not-exist


🧹 Cleanup (to avoid charges)

Delete the resource group: az group delete -n rg-static-web-trial --yes --no-wait

Enhancement Skill Demonstrated
Add custom domain + HTTPS (Azure Front Door) CDN + SSL acceleration
Replace deploy script with GitHub Actions Full CI/CD pipeline
Add storage lifecycle rules Cost governance & data tiering

πŸ”„ Next Enhancements (Roadmap)

Enhancement Purpose Skill Area
Add GitHub Actions Workflow for Auto Deploy Removes manual script execution CI/CD
Add Custom Domain + HTTPS via Azure CDN Production-grade hosting Networking & Certificates
Convert HTML to React Frontend Modern front-end architecture Web App Engineering

About

This lab demonstrates how to host a static website using Azure Blob Storage. I created and uploaded HTML pages to the special $web container, enabled static website hosting, and tested public access. I then added version control with GitHub and built a PowerShell deployment script to automate future site updates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published