*.sites.reliantlabs.dev hostname, served from Reliant hosting’s static hosting and CDN, with a recorded release you can deploy again or promote. The same steps work for a Next.js static export.
A static site is a complete Forge project with no backend. Reliant owns the bucket, the CDN and the hostname, and one static site per person is free, across the organizations you own that have no hosting plan.
Before you begin
- Reliant v1.21.3 or later, signed in. Inside Reliant, Forge runs as
reliant forge. This guide was run on Forge v1.6.1. Use v1.5.0 or later, the first release whereobs checkjudges a static site by its browser telemetry. - Node 20.19 or later (the Vite starter’s minimum; Next.js needs 20.9) and git, with a git identity set, so Forge can make the first commit.
- An existing app instead of a new one? Deploy without an account adopts a Vite or Next.js app where it stands.
1
Create the site
--frontend-kind is vite-spa or nextjs:terminal
Output (trimmed)
deploy/kcl/prod/main.k binds the frontend to hosting with runtime = forge.OnHosted {} and names where the build lands (public_dir = "dist", or "out" for Next.js). reliant forge env up dev runs the dev server.2
Check that it builds as a static export
Hosting serves files, so the build must produce plain HTML, JS and CSS:For Next.js, the lint names each thing an export cannot serve, with its file and line. A Vite SPA has nothing to check there, so
terminal
Output (trimmed)
npm run build is the proof. Commit before the next step: a release from a dirty tree describes no commit.3
Cut a release
Build once, push, and record every digest under a version name:Source maps are stored beside the release, not served. Releases and promotion explains what a release records.
terminal
Output (trimmed)
4
Deploy it to prod
--yes means “I read the plan”. Without a terminal or --yes, the deploy stops at the plan (exit 5) and promotes nothing. To approve a reviewed plan instead, use --plan-only and then --approve <digest>:terminal
Output (trimmed)
5
Verify the site and its caching
terminal
Output (trimmed)
/config.js (the per-environment runtime config) are no-cache, so a new release shows on the next load. Hashed assets are cached for a year, and age on a repeat request means the CDN edge answered. An unknown path with no extension returns index.html with a 200, so client-side routing works. A missing file with an extension returns 404.6
Check the release's health
terminal
Output (trimmed)
curl runs no JavaScript. With no visitors, the result is exit 2: not proven good, which is not a pass. Exit 0 is PASS and exit 1 is FAIL.7
Clean up
Delete the environment when you are done with a trial site:Within a minute the hostname answered
terminal
Output (trimmed)
404. The project’s release images stay in the registry. They belong to the project, not the environment.The free tier and a second environment
Without app hosting billing, the free tier covers one static site, counted across environments, so deploy prod first. A second environment’s deploy is recorded but held:env deploy prints the billing link and exits 7, and the site goes live by itself once billing is set up, with nothing to re-run. With billing in place, it deploys like the first. Queued deploys has the details and the free tier’s storage and traffic limits.
What this does not do
- No rollback command. To go back, deploy an earlier release, or cut a new one with the fix. Releases and promotion covers rollback floors.
- No code at request time. There are no server-rendered pages, API routes or middleware. A site that needs a backend gets its own Forge project, reached by URL.
- No redirects of your own. Host redirects such as www to the bare domain cannot be declared. Response headers can: a
_headersfile at the root of the build (public/_headersin a Vite app, which the build copies intodist/) adds headers such as aContent-Security-Policy, in the Netlify and Cloudflare Pages format. See the static edge and origin. - Replay is masked and off until consent. The starter’s
main.ksets_session_replay = True, but nothing records until a visitor consents, and text and inputs are always masked. Set it toFalseto turn replay off. See Session timelines and replay.
Troubleshooting
static-export-dynamic-segment: /posts/[slug] is a dynamic route ([slug]) with no generateStaticParams
static-export-dynamic-segment: /posts/[slug] is a dynamic route ([slug]) with no generateStaticParams
A Next.js export renders every page at build time. If the values are known at build time, export
generateStaticParams() returning each one. Otherwise, move the id into the query string (/posts/view?slug=…) and read it with useSearchParams.CutRelease failed (HTTP 404, not_found) ... release, environment or deployment not found
CutRelease failed (HTTP 404, not_found) ... release, environment or deployment not found
On Forge v1.6.1,
env build --release failed this way when another project in the same organization had already cut that version name. The run behind this guide hit it with v0.1.0. Cutting the release under a version name no other project in the organization has used worked.Next steps
Releases and promotion
How a release is built once and promoted by digest, with approvals and rollback floors.
Promote staging to production
Deploy the exact release staging runs to prod with
--from staging.Custom domains
Serve the site on a hostname you own, with automatic HTTPS.
Deploy without an account
Publish an existing app with no signup and hand over a claim link.