# Ship it

GitHub plus a host that deploys from GitHub (Vercel, Netlify and Cloudflare Pages are the usual ones) turns "it works on my laptop" into a real link that updates itself. This is how I run my own projects.

## One-time setup

- [ ] My project is on GitHub. (Ask your agent: "Create a GitHub repo for this and push it.")
- [ ] I signed in to the host with GitHub and imported the repo.
- [ ] The build command and output folder are right. (The host usually guesses. If the deploy fails, paste the log to your agent.)
- [ ] The first deploy worked, and I opened the link.

My live link:

## How it works after that

- **Push to `main`:** the live site updates within a minute or two.
- **Open a pull request:** you get a **preview link** for that branch. Check it there before merging. It's the best habit in this pack.
- **Merge the PR:** it goes live.

## Secrets and API keys

The one mistake that really costs you.

- [ ] Keys never go in the code, and never in a commit. Not even "just for now".
- [ ] They live in the host's **environment variables** settings (and in a local `.env` file that's listed in `.gitignore`).
- [ ] Set them for every environment you use: usually Production *and* Preview.
- [ ] After adding or changing one, **redeploy**. Existing deployments won't see the new value.
- [ ] If a key ever ends up in a commit: revoke it and make a new one. Deleting the line isn't enough, because git remembers it.

## A custom domain (optional)

- [ ] Buy it from any registrar.
- [ ] Add it in the host's domain settings and follow its DNS instructions exactly.
- [ ] Wait. DNS can take a while. HTTPS is usually set up for you.

## Before you share it

- [ ] Everything in `05-review-checklist.md` under "Before anything goes live".
- [ ] It has a title, a description, and a sharing image (ask: "Add a proper page title, description and social sharing image").
- [ ] I sent it to one person the app is for, and asked where they got stuck.
