The site is pure static files — no build step, no backend — so deployment is genuinely one command. Pick the CLI route (fastest) or the GitHub route (automatic updates). Both are free.
Two accounts and one folder — that's the entire prerequisites list.
index.html, css/ and js/:node -v
npm -v
*.vercel.app URL for free.From zero to a live URL in the terminal, no browser juggling.
npm install -g vercel
index.html):cd path/to/pymastery
vercel login
vercel
Set up and deploy? Y
Which scope? your-account
Link to existing project? N
Project name: pymastery
In which directory is your code? ./
Want to modify the settings? N
# → "Inspect: https://vercel.com/…/pymastery/…”
vercel --prod
Production: https://pymastery.vercel.app [3s]
Every git push redeploys automatically. Best for a project you keep improving.
git init
git add .
git commit -m "Initial commit — PyMastery site"
gh repo create pymastery --public --source=. --push
If you created the repo in the browser instead, push to it:
git remote add origin https://github.com/YOUR-USER/pymastery.git
git branch -M main
git push -u origin main
| Setting | Value |
|---|---|
| Framework Preset | Other (nothing to build) |
| Build Command | leave empty |
| Output Directory | / (repository root) |
| Install Command | leave empty |
*.vercel.app URL. From now on, every git push to main publishes a new production deploy automatically; other branches get shareable preview URLs.This project ships one — here is exactly what each line does.
{
"cleanUrls": true,
"trailingSlash": false,
"outputDirectory": ".",
"headers": [
{
"source": "/(.*)",
"headers": [
{ "key": "X-Content-Type-Options", "value": "nosniff" },
{ "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin" }
]
}
]
}
| Key | Meaning |
|---|---|
cleanUrls: true | Serves /learn instead of /learn.html. Direct .html links keep working, so nothing breaks. |
trailingSlash: false | One canonical URL per page — avoids duplicate-content SEO issues. |
outputDirectory: "." | Deploy the folder as-is, no build. (If Vercel ever rejects the file, delete this line — the dashboard default is the repo root anyway.) |
headers | Small security hardening headers on every response. |
vercel.json entirely also works — Vercel will simply serve the folder with its defaults. The file just makes the behavior explicit and repeatable.Turn pymastery.vercel.app into learnpython.com — HTTPS is issued automatically.
learnpython.com) and press Add.76.76.21.21www) → a CNAME record pointing to cname.vercel-dns.comChanging content later takes seconds.
cd path/to/pymastery
vercel --prod
git add .
git commit -m "Update lesson content"
git push
| Task | Command / action |
|---|---|
| Preview a branch | Push any branch that isn't main — you get a preview URL |
| Roll back | Dashboard → project → Deployments → … → Promote to Production |
| Rename the project | Settings → Project Name (the URL changes with it) |
| Unlink this folder | vercel rm in the project folder, or remove the integration on GitHub |
Saved in your browser as you tick.
Everything below has a one-line fix.
| Symptom | Fix |
|---|---|
vercel: command not found | Reopen the terminal after npm install -g vercel, or run it via npx vercel instead |
| Deployed folder shows a file listing / 404 | You deployed a parent folder. The directory containing index.html must be the project root |
| Blank page or missing CSS | Check the paths are relative (no leading /) — this project already uses relative paths everywhere |
| Playground never loads the runtime | It needs the jsDelivr CDN — check the browser console. Everything else still works offline of that |
| “Authentication required” on first CLI run | Run vercel login first, then vercel --prod |
| Wrong project linked | Run vercel link again inside the correct folder (it creates .vercel/project.json) |
| Old version still showing | Vercel's CDN caches hard — append ?v=2 to test, or wait a few seconds and refresh |
| Custom domain not securing | Confirm the DNS records exactly as Vercel shows them; apex uses A 76.76.21.21, www uses CNAME cname.vercel-dns.com |