> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ochrebound.ibrahimsultan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Build and deploy

> From a Unity WebGL build to the live site: the release build, the packager's checks, and the Cloudflare deploy with its post-deploy list.

```mermaid actions={false} theme={"system"}
%%{init: {'themeVariables': {'fontFamily': 'IBM Plex Sans', 'fontSize': '14px'}, 'flowchart': {'wrappingWidth': 240, 'nodeSpacing': 30, 'rankSpacing': 34}}}%%
flowchart TD
  A["OchreboundBuild.WebGLLiving: release settings and BC7 rules"] --> B["webgl_site.py: parts, film streams, CSP, headers"]
  B --> C["Wrangler 4: Cloudflare Workers static assets"]
  C --> D["ochrebound.ibrahimsultan.com"]
  D --> E["Post-deploy checks on the live site"]
```

## 1. The Unity build

`Editor/OchreboundBuild.cs` builds the shipped scene for WebGL and sets every release setting in code, so nothing depends on what the editor happened to have selected. It also runs the texture rules before building: BC7 on large, block-friendly painted sprites, mipmaps off where a non-power-of-two size would otherwise block compression, data maps untouched, and the children's sheets exempt from the mip budget. [Why](https://docs.ochrebound.ibrahimsultan.com/web/textures.md).

The settings themselves are listed on [Booting behind the film](https://docs.ochrebound.ibrahimsultan.com/web/boot.md#the-build-settings-enforced-in-code).

## 2. Packaging

`tools/web/webgl_site.py` turns the build into a static site and refuses to finish on any violation:

| It checks or writes | Detail |
| :- | :- |
| The 25 MiB per-file cap | Splits the data into gzip parts of at most 24 MiB, named by content hash, and fails if any output file reaches 25 MiB |
| The opening film | Remuxes the MP4 into separate fragmented video and audio streams, checks packet counts, and keeps the original for Safari |
| The first frame | Inlines the tier rules and the loader's runner art into the page, so the first paint needs no extra request |
| The loader | Checks the tricks timeline against the runner data |
| Font coverage | Confirms every visible character exists in the self-hosted title font |
| Content security policy | Hashes every inline script into the policy, sets `frame-ancestors 'none'` and `object-src 'none'` |
| Caching | Revalidate the page; one-year immutable for `/Build/`, `/menu/`, `/film/`, `/music/` and streaming assets |
| Deploy hygiene | Writes `.assetsignore` so Wrangler's own cache and config are never uploaded |

## 3. The deploy

The game's Worker is configured in `wrangler.jsonc` at the repository root: the Worker `ochrebound`, the custom domain `ochrebound.ibrahimsultan.com`, no `workers.dev` URL and no preview URLs.

```bash theme={"system"}
npx --yes wrangler@4 deploy --config wrangler.jsonc
```

## 4. After every production deploy

**1. Every asset answers 200**

Every file in the packaged site (except the headers and ignore files) returns HTTP 200 from the live domain.

**2. Private paths answer 404**

Wrangler's cache, `.assetsignore` and `wrangler.jsonc` must not be reachable.

**3. Headers are right**

The content security policy, `X-Frame-Options: DENY`, `X-Content-Type-Options: nosniff`, and no unexpected third-party beacons.

**4. It runs on a real GPU**

The loader sandbox check passes under the live policy, the street boots with no console errors, the mobile gate shows on handheld viewports with nothing downloaded, and rebinding works both ways between the two menus.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.