Codex guide

How to host a Codex website.

A website created with Codex can be ready for publishing quickly, but the generated code still needs a clear project root, a reproducible production build and a static result. This guide turns that into a GitHub-backed publishing workflow.

What matters

Host the finished website, not the chat transcript.

Codex can generate files, change a framework configuration and suggest commands. Hosting still needs a repository that represents the website you mean to publish. Before connecting anything, make sure the project has one intended root, documented build command and finished output folder.

Host Luma's public AI Hosting workflow is for supported static website output. It does not claim a special Codex integration or turn a server-dependent application into a static site. If the project needs request-time secrets, an API server, a database, authentication service, Docker or server-side rendering, use a runtime designed for those requirements.

A reliable checklist

Validate a Codex-built site before publishing.

01Review the diff

Confirm the generated files are in the intended project, not an exported scratch folder or a nested example application.

02Read the build script

Use the project's normal production command. Check what it creates rather than accepting an assumed output folder.

03Build locally

A successful development preview is not enough. Run the production build and open the generated static result.

04Check public values

Keep private values out of source. Treat a required server-only secret as a signal that a static host is not the complete solution.

05Push the source

Commit the verified project to GitHub so each release has a source revision behind it.

From repository to preview

Publish the supported static output through GitHub.

With the correct source in GitHub, create an AI Hosting project and select the repository and branch you checked. Host Luma publishes supported static output, provides an HTTPS preview URL and records the deployment outcome. Test the main journeys on the preview URL before treating it as ready for a client or custom domain.

Keep the next change in GitHub too. When Codex suggests a correction, review it, commit it, then publish through the same route. This gives you a clear history instead of a sequence of manual uploads that are hard to reproduce.

When a generated site fails

Use the first build error to guide the next prompt.

Start with the earliest relevant message in the deployment log. Reproduce that build locally, then make one specific correction. A request such as “make the production build succeed and keep static output” is more useful than asking an AI tool to rewrite unrelated files after a failed publish.

For Vite, Astro, React and Next.js static-export projects, use the framework reference to confirm output expectations. If the only fix is to add a server process or database, stop and choose a suitable application runtime.