Skip to content
Website ↗

Website & deployment ​

The landing page uses Vite; this documentation suite uses VitePress. Both import the copper and mint palette in website/shared/palette.css. The composition follows hyprlax.com: centered monospace branding, a large real demo, a command block, project links, and a compact feature grid.

Local development ​

Install Node.js 22.12+ (CI uses Node 24) and npm. From the repository root:

sh
npm ci
npm run dev

Open http://127.0.0.1:5173/ for the landing page and http://127.0.0.1:5173/docs/ for documentation. Vite proxies /docs to VitePress on port 5174, including WebSocket traffic for hot reload. Both servers stop when the parent command exits. Ports 5173 and 5174 must be free.

Edit website/index.html or website/src/ for the landing page; edit docs/*.md for documentation. Preparation scripts copy the existing demo media and reference images into ignored public asset directories for both dev and production. Existing design and verification documents are included in the site. Evidence outside docs/ links to its GitHub source. The VitePress 1.x dependency uses a pinned Vite 6.4.4 override for patched development-server dependencies.

Build and preview ​

sh
npm test
npm run build
npm run preview

Preview the combined output at http://127.0.0.1:4173/ and http://127.0.0.1:4173/docs/. The output is:

text
dist/
  index.html
  assets/
  favicon.svg
  media/
  docs/
    index.html
    getting-started.html
    assets/
    ...

The full build cleans dist/, builds the landing page, then builds VitePress into dist/docs/. A final check validates local HTML links and the docs asset prefix. Documentation uses .html URLs so the CDN needs no extensionless route rewriting. npm run build:site cleans the entire output; always run the full build before deploying.

Prepare Bunny ​

  1. Create a dedicated Bunny Storage Zone and connect a Pull Zone to it. Setup will detect its upload endpoint automatically.
  2. Leave Block Root Path Access disabled on the Pull Zone. The build supplies index.html at the root and docs/index.html for the documentation directory. Do not enable SPA fallback or HTML minification; the docs deliberately use .html page links.
  3. Attach your hostname and enable HTTPS, or use the Pull Zone's HTTPS b-cdn.net hostname.
  4. Note the storage zone name, storage password, Pull Zone numeric ID, and account API key. The storage password uploads files; the account key purges the CDN. These are separate credentials.

See Bunny's HTTP storage documentation for endpoint and credential details.

Configure GitHub ​

The helper needs the GitHub CLI authenticated with repository administration access:

sh
gh auth login
npm run setup:bunny -- --repo sandwichfarm/hyprflow

Each prompt explains what the value does, where to find it, and an example. Values are checked immediately: an invalid entry repeats only that prompt. You are not asked for an upload hostname: setup reads it from Bunny using your Storage Zone name and account API key, including when replication is enabled.

The helper checks GitHub authentication before asking for credentials. It creates the production GitHub environment if needed, preserves existing protection rules, and saves these values:

KindNameWhat to enter and where to find it
VariableBUNNY_STORAGE_ZONEZone name, not ID. Storage → your zone; also the username under Access / FTP & API Access.
VariableBUNNY_STORAGE_HOSTDetected automatically from the Storage Zone API and saved for the deploy workflow. An explicit HTTP upload hostname can still be supplied through the environment.
VariableBUNNY_PULL_ZONE_IDNumeric ID of the connected CDN Pull Zone. Open CDN → your Pull Zone and copy its numeric ID from the dashboard URL, not the Storage Zone ID.
VariableBUNNY_PUBLIC_URLThe website address visitors will open. Under CDN → your Pull Zone → General → Hostnames, use the default your-zone.b-cdn.net hostname or an HTTPS custom domain you connected.
SecretBUNNY_STORAGE_PASSWORDWritable Storage Zone password under Storage → your zone → Access / FTP & API Access. Do not use the read-only password, login password, or account API key.
SecretBUNNY_API_KEYAccount API key from Account → API Key, used to look up the upload endpoint and purge the CDN cache.

BUNNY_PUBLIC_URL is our variable name, not a Bunny setting. For example, enter https://hyprflow-site.b-cdn.net or your connected custom domain, such as https://hyprflow.com. It only sets the clickable website link on the GitHub deployment. It does not configure DNS or select the upload destination. A bare hostname is accepted interactively and gets https:// added; omit /docs and other paths.

For replicated storage, keep using your *.b-cdn.net delivery address for the public website. Bunny's replication documentation describes uploads going to the primary region before replication. Setup reads that region from the account API; it does not alter replication. If a *.b-cdn.net address was exported as BUNNY_STORAGE_HOST, setup treats it as the public URL (unless you already supplied one), then detects the upload endpoint. It never sends your storage password to the delivery hostname.

Endpoint detection is read-only and has a 30-second timeout. It accepts both plain-list and paginated Bunny API responses. If the zone cannot be found or the API lookup fails, setup exits before changing any GitHub variables or secrets. A supplied BUNNY_STORAGE_HOST that already names a valid HTTP upload endpoint bypasses detection.

Secret prompts remain visible while typing is hidden. Paste the secret and press Enter; Received (hidden). confirms it was read. Ctrl+C or end-of-input cancels without changing GitHub settings during the prompt phase. Once saving starts, progress names each operation, and every GitHub command has a 30-second timeout.

Interactive setup saves each accepted answer before continuing. Answers, including secrets, are stored unencrypted in a Git-ignored .bunny-setup/ directory at the project root, with owner-only directory (0700) and file (0600) permissions. The script prints the exact file path. If interrupted, if lookup fails, or if GitHub saving fails partway through, rerun the same command to resume without re-entering saved answers. Resume data is separate for each repository and GitHub environment and is removed after every GitHub setting is saved successfully. To correct one saved answer, export that variable before rerunning; exported values override saved answers. Delete .bunny-setup/ to discard all saved answers. Older script versions did not save answers, so entries from an already exited older run cannot be recovered by this helper.

Read all prompt explanations without entering values or contacting GitHub:

sh
npm run setup:bunny -- --help

Values can instead be supplied as exported environment variables for noninteractive use. The setup helper detects BUNNY_STORAGE_HOST when omitted; the deployment workflow receives the resolved hostname. Secrets go to gh over stdin and are never printed. Noninteractive runs and dry runs do not read or write resume files. The helper does not source .env files. Use --environment NAME only with a corresponding workflow environment change.

Preview the setup without changing GitHub:

sh
npm run setup:bunny -- --repo sandwichfarm/hyprflow --dry-run

No credentials are needed for this dry run. Missing values are shown as unconfigured. This script does not create Bunny resources or change DNS.

GitHub workflows ​

  • Website checks runs tests, a combined build, and a deployment dry run on pull requests and pushes to main. It saves dist/ as an artifact.
  • Deploy website to Bunny builds and verifies the same output, then uploads it after relevant pushes to main or a manual dispatch on main. It reads the production environment and allows one deployment at a time without canceling an active upload.

Pull requests never receive deployment secrets. After configuring the environment, use Actions → Deploy website to Bunny → Run workflow on main for the first deployment. Later relevant pushes to main deploy automatically.

Manual deployment and rollback ​

sh
npm run build
npm run deploy:dry-run
# With all six BUNNY_* settings exported:
npm run deploy

The uploader checks the combined build before networking, uploads assets before HTML, includes SHA-256 checksums, and requests a Pull Zone cache purge only after every upload succeeds. Network errors, HTTP 429, and server errors retry up to three attempts. Other failures stop immediately with a nonzero exit code. Credentials are sent only to validated Bunny endpoints; redirects are rejected.

Uploads retain old files so cached pages can still fetch their previous hashed assets. Deployment is not atomic: an interrupted upload can leave a partial release. Re-run the workflow to finish it, or check out the previous commit, build, and deploy again to restore its pages. Removed pages and old assets remain until explicitly cleaned up in Bunny Storage. Use a dedicated zone so retained content is easy to manage.

After the first deployment, verify the configured public URL, /docs/, a deep page such as /docs/getting-started.html, and docs search. Bunny provisioning and live delivery require your credentials; local tests and dry runs make no remote changes.

Classic Cover Flow for Hyprland workspaces.