Scrollcraft
Chapter 14 of 15RO

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.

Chapter 14 of 153 min read

What you will learn

By the end of this chapter
  1. 01Publish a static site or a Next.js app, with preview deployments for every branch.
  2. 02Connect a domain and add the metadata for search results and shared links.
  3. 03Run lint, the build and the tests automatically on every push.
  4. 04Look after the site once it is live: errors, updates and repeat checks.

01 · Publish the folder

Any static host

The 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.

bash
npx vercel

02 · Publish a Next.js app

Vercel
a

Connect 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.

bash
npx vercel          # a preview deployment
npx vercel --prod   # production
b

Environment 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 shared
a

A domain

Add the domain in the host’s dashboard and create the DNS records it shows you. HTTPS certificates are issued automatically.

b

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.

index.html
<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>
c

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

CI
a

On 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.

ci.yml
# .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 test

05 · After launch

Keep it healthy
1

Watch 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.

2

Measure gently

Use privacy-friendly analytics, or none. A cookie banner on a cinematic site undoes the first impression.

3

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.

4

Run the checklist again

Before every larger change, go through the release checklist from the Testing chapter once more.

06 · Keep going

Official docs
Code

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 tool

Let 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

Prompt
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

Prompt
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 compare
1

Preview 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.

2

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.

3

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 course

Put the site for [subject] online, and set it up to stay healthy.

  1. Publish the folder on a static host, or the app on Vercel, from a Git repository.
  2. Run “Metadata”, deploy, and check the shared card.
  3. Run “CI workflow”, push, and confirm the checks pass.
  4. 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.xml and /robots.txt load.
  • A push runs CI, and a failing change shows a red check.

Practice · Assessment

Acceptance criteria

0 of 4 criteria met

Next Reference

A table of common faults with their causes and fixes, and a glossary of the terms used in the course.

Keyboard shortcuts: [ previous chapter · ] next chapter