Deploying Static Sites
Static sites are the easiest projects to deploy. Since they're just files — HTML, CSS, and JavaScript — the hosting platform simply serves them to visitors. No server code runs, which means simpler setup and often free hosting.
How Static Deployment Works
The process is straightforward:
- Connect your Git repository to a hosting platform
- Configure basic settings (which folder contains your site)
- The platform builds and deploys your site
- You get a live URL
Every time you push changes to your repository, the platform automatically redeploys. Your live site stays in sync with your code.
Popular Platforms
Netlify — Excellent for beginners. Drag-and-drop deployment or Git integration. Generous free tier.
Vercel — Great developer experience. Originally built for Next.js but works with any static site.
GitHub Pages — Built into GitHub. Perfect if your code is already there. Slightly more limited but completely free.
All three platforms offer free custom subdomains (like yourproject.netlify.app) and support custom domains if you own one.
Deploying to Netlify
Here's the typical flow:
- Sign up at netlify.com
- Click "Add new site" → "Import an existing project"
- Connect your GitHub account
- Select your repository
- Configure build settings (often auto-detected)
- Click "Deploy site"
Within minutes, you'll have a live URL.
Getting AI Help
If you get stuck, AI can walk you through platform-specific steps:
I have a static HTML/CSS/JS site in a GitHub repo.
Walk me through deploying to Netlify:
- What settings do I need?
- How do I connect my repo?
- How do I get a custom subdomain?
Build Settings
Some static sites need a build step — for example, if you're using a framework that compiles your code. The platform needs to know:
- Build command — What command creates your production files (e.g.,
npm run build) - Publish directory — Where the built files end up (e.g.,
distorbuild)
For simple HTML/CSS/JS sites with no build step, you can often leave these blank or point directly to your root folder.
Automatic HTTPS
Modern static hosting platforms automatically provide HTTPS certificates. Your site will be secure by default — no extra configuration needed.