# Deployment

The MVP is a static Astro site. It can be deployed to Cloudflare Pages, GitHub Pages, Netlify, or any static host.

## Cloudflare Pages

1. Open Cloudflare Dashboard → Workers & Pages → Create application → Pages.
2. Connect the GitHub repository: `Gamexgit/TrueTraceShorts_WebSite`.
3. Select the production branch once merged.
4. Set build settings:

```text
Framework preset: Astro
Build command: npm run build
Output directory: dist
Node version: 22.12 or newer
```

5. Deploy.

## Custom domain

After the first successful deployment:

1. Open the Pages project.
2. Go to Custom domains.
3. Add the TrueTraceShorts domain.
4. Follow Cloudflare DNS instructions.

## Notes

- No environment variables are required for MVP.
- Do not commit API keys, analytics tokens, affiliate tokens, or platform credentials.
- If analytics is added later, update `/privacy/` before enabling it.

## Pre-push / post-deploy QA

Before pushing or deploying a content/site change, run:

```bash
npm run sync:youtube-links -- --dry-run
npm run sync:youtube-links -- --apply
npm run qa:production
```

After the host deploys, run the live smoke check when the custom domain should be reachable:

```bash
npm run qa:live
```

Live-domain errors can be DNS/propagation issues, so do not claim production deployment is live unless the live check returns success or the hosting platform confirms deployment.
