Production and launch: ship it and keep it healthy.
Publishing takes minutes. What makes it professional is everything around it: a domain, metadata, checks that run on every change, and someone looking after the site once it is live.
What you will learn
By the end of this chapter- 01Publish a static site or a Next.js app, with preview deployments for every branch.
- 02Connect a domain and add the metadata for search results and shared links.
- 03Run lint, the build and the tests automatically on every push.
- 04Look after the site once it is live: errors, updates and repeat checks.
01 · Publish the folder
Any static hostThe result is three static files, so any static host will serve it. Check each host’s page for current limits and prices.
Netlify
Drag the folder onto the Netlify Drop page, or deploy from the command line.
Vercel
Run the command below inside the folder and follow the prompts.
GitHub Pages
Push the folder to a repository, then turn on Pages in the repository settings.
Cloudflare Pages
Upload the folder from the dashboard, or connect a repository.
npx vercel02 · Publish a Next.js app
VercelConnect the repository
Import the repository on Vercel. Every push to the main branch deploys to production, and every other branch gets its own preview address to check before merging.
npx vercel # a preview deployment
npx vercel --prod # productionEnvironment variables
Set them in the project settings, separately for preview and production. Only variables that start with NEXT_PUBLIC_ reach the browser; keep keys and secrets without that prefix.
03 · Domain and metadata
Found and sharedA domain
Add the domain in the host’s dashboard and create the DNS records it shows you. HTTPS certificates are issued automatically.
The head of the page
A title and description for search results, a canonical address, and an Open Graph image for the card shown when the link is shared.
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Aurora: sound that fills the room</title>
<meta name="description" content="A small speaker that plays in every direction.">
<link rel="canonical" href="https://example.com/">
<!-- the card shown when the link is shared -->
<meta property="og:title" content="Aurora">
<meta property="og:description" content="A small speaker that plays in every direction.">
<meta property="og:image" content="https://example.com/og.jpg">
<meta name="twitter:card" content="summary_large_image">
</head>Sitemap and robots
A sitemap.xml lists every page; robots.txt points to it. Next.js generates both from app/sitemap.ts and app/robots.ts.
04 · Automate the checks
CIOn every push
A workflow runs lint, the build and the browser tests from the previous chapter. A change that breaks the site never reaches production unnoticed.
# .github/workflows/ci.yml: every push and pull request is checked
name: CI
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22, cache: npm }
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npx playwright install --with-deps chromium
- run: npx playwright test05 · After launch
Keep it healthyWatch errors
Look at the host’s runtime logs, or add an error tracker, for the first days. Visitors find the combinations you did not test.
Measure gently
Use privacy-friendly analytics, or none. A cookie banner on a cinematic site undoes the first impression.
Update on a schedule
Once a month: update dependencies, run the tests, compare the screenshots. Libraries loaded from a CDN stay pinned to an exact version.
Run the checklist again
Before every larger change, go through the release checklist from the Testing chapter once more.
06 · Keep going
Official docsWhere each piece is documented
Libraries used here
Lenis for smooth scrolling, GSAP ScrollTrigger for scrubbed and pinned animation, and three.js for the particle head. GSAP became free for commercial use in 2025, per Webflow’s announcement.
Practice · Work with AI
The same task in your toolLet the AI write configuration, but publish and connect domains yourself: those steps touch accounts and cost money.
Open a terminal in the project folder and run claude. Press Shift+Tab until plan mode is on, paste the prompt, read the plan, then approve it. Project rules go in CLAUDE.md.
Metadata
Read CLAUDE.md. Add the head metadata for the site for [subject]: title, description, canonical URL, Open Graph title, description and image, and the Twitter card. Use only text from brief.md. Also add a sitemap.xml and a robots.txt that points to it. Show me the changes.CI workflow
Write .github/workflows/ci.yml that runs on every push and pull request: install with npm ci, lint, build, install Playwright with Chromium and run the tests. Pin the action versions. Explain each step in one line.Open a terminal in the project folder and run gemini; the first time, it asks whether you trust the folder, so say yes for your project. Paste the prompt. Gemini CLI asks before it edits a file or runs a command: read each request before you accept it. Project rules go in GEMINI.md.
Metadata
Read GEMINI.md. Add the head metadata for the site for [subject]: title, description, canonical URL, Open Graph title, description and image, and the Twitter card. Use only text from brief.md. Also add a sitemap.xml and a robots.txt that points to it. Show me the changes.CI workflow
Write .github/workflows/ci.yml that runs on every push and pull request: install with npm ci, lint, build, install Playwright with Chromium and run the tests. Pin the action versions. Explain each step in one line.Open a terminal in the project folder and run codex, then paste the prompt and approve each change. In the ChatGPT app without Codex, attach the files, paste the prompt and copy the changes back yourself. Project rules go in AGENTS.md.
Metadata
Read AGENTS.md. Add the head metadata for the site for [subject]: title, description, canonical URL, Open Graph title, description and image, and the Twitter card. Use only text from brief.md. Also add a sitemap.xml and a robots.txt that points to it. Show me the changes.CI workflow
Write .github/workflows/ci.yml that runs on every push and pull request: install with npm ci, lint, build, install Playwright with Chromium and run the tests. Pin the action versions. Explain each step in one line.Practice · Exercises
Try first, then comparePreview before production
Push a branch with a visible change. Find its preview address and check it before you merge.
Hint: the host comments the preview link on the pull request, or lists it in the dashboard.
Show the solution
Every branch gets its own address, so you can check a change on a real phone before it reaches visitors. Merge only after the preview passes the checklist.
Check the shared card
Paste your site’s address into a messaging app or a social post draft. Does the card show the right title, text and image?
Hint: the card reads the Open Graph tags.
Show the solution
If the image is missing, the og:image URL is probably relative or the image is too small. Use an absolute URL and an image of about 1200 by 630 pixels.
Break the build on purpose
Push a commit with a lint error to a branch. What does CI do?
Hint: look at the checks on the pull request.
Show the solution
The workflow fails at the lint step and the pull request shows a red check, so the change cannot be merged unnoticed. Fix it and push again.
Practice · Course project
One site, built across the coursePut the site for [subject] online, and set it up to stay healthy.
- Publish the folder on a static host, or the app on Vercel, from a Git repository.
- Run “Metadata”, deploy, and check the shared card.
- Run “CI workflow”, push, and confirm the checks pass.
- Connect a domain if you have one, and write a monthly maintenance note in
notes.md.
Practice · Test it
Check the result- The live address loads over HTTPS with no console errors.
- A shared link shows the right title, text and image.
/sitemap.xmland/robots.txtload.- A push runs CI, and a failing change shows a red check.
Practice · Assessment
Acceptance criteria0 of 4 criteria met