Build and deploy the website
Everything for the public site and these docs lives in website/. It has its own package.json and lockfile, separate from the artifact server’s dependencies.
The site uses Next.js 14, Nextra 2, React 18, and next-sitemap, with output: 'export'. The build produces static HTML, CSS, JavaScript, and assets in website/out/. There is no Next.js server, Worker API, database, or runtime dependency installation in the deployed site.
Work on the site
Use Node.js 22+:
cd website
npm ci
npm run devOpen http://localhost:3100. The landing page is pages/index.jsx; the guides are MDX files in pages/docs/. theme.config.jsx configures Nextra navigation, search, and the documentation theme.
To preview the compiled result:
npm run build
npm run previewStop the development server before starting the preview on the same port. PORT=3101 npm run preview uses a different port.
Deploy to Cloudflare Pages
The Website build and Cloudflare deploy GitHub Action builds the static site and runs its browser tests. A successful push to main deploys the tested output to Cloudflare Pages. Pull requests run the same checks without deployment credentials.
- In GitHub Settings → Secrets and variables → Actions, add
CLOUDFLARE_API_TOKENandCLOUDFLARE_ACCOUNT_ID. The token needs Account → Cloudflare Pages → Edit, plus Zone → Zone → Read and Zone → DNS → Edit foropenartifact.sh. - Add
openartifact.shas a zone in that Cloudflare account and point the domain’s nameservers to Cloudflare. - Push your website changes to
main. The workflow creates theopen-artifact-websitePages project if needed and uploadswebsite/outusing Wrangler. - It attaches
openartifact.shand creates its DNS record if missing. If the domain points to another service, it reports that conflict and keeps the existing DNS. The Pages URL remains available even if domain setup needs attention.
The workflow is .github/workflows/website.yml; the Pages configuration is website/wrangler.toml. The deployed website is only static files. Do not run next start or use the root Dockerfile for it. The canonical URLs, sitemap, and social metadata already use openartifact.sh.
See Cloudflare's Direct Upload with continuous integration guide (opens in a new tab) for the account and token setup.
Server releases
Server releases are separate from website deployment. A vX.Y.Z Git tag matching Cargo.toml triggers:
- Native releases (
release.yml): builds Linux and macOS archives for x86_64 and arm64 on native runners, includes Node and production dependencies, tests the installer, and publishes checksums and GitHub build attestations. - Docker Hub release (
publish.yml): runs the offline-container eval, builds amd64 and arm64 images, publishes todusanstanojeviccs/open-artifact, and signs the image digest with Cosign. Build provenance and an SBOM are attached.
The Docker workflow needs a DOCKERHUB_TOKEN secret with write access to that repository. Its username is dusanstanojeviccs. Signing uses GitHub OIDC; there is no long-lived signing key to store. Both release workflows check that the tag belongs to main before publishing. Release tags should be protected from replacement.
To release: finish the checks, update the version in Cargo.toml and Cargo.lock, merge to main, and push the matching version tag. Re-running native publication does not overwrite existing release archives.
The website serves public/install.sh. Keep it identical to scripts/install.sh; website CI checks this before deployment. The installer downloads from this repository's GitHub Releases.
Update the content and screenshots
User-facing guides live here. The runtime authoring skill stays in skills/build-artifact/ because the Rust binary embeds it for MCP clients. web/ remains the artifact server’s own login, viewer, and sandbox code.
The site uses local fonts and assets. The hero shows screenshots of real artifacts created through MCP and rendered by a local Open Artifact server. The examples use labeled sample data.
To regenerate the screenshots, build the backend from the repository root with cargo build --locked and npm run build, then run npm run capture:artifacts in website/. The capture script starts a temporary local server, creates three artifacts, verifies actions, reload persistence, and query navigation, captures every page and slide at desktop and mobile sizes, and stops the server. Example source lives in website/examples/.
The published website serves those images locally. Visitors do not connect to the artifact backend.
Dependency maintenance
The requested Next.js 14 / Nextra 2 release lines are older and still have upstream dependency advisories. This site compiles only repository-owned MDX and deploys static files; it must not be used to serve untrusted MDX or run a public Next.js application server. Compatible transitive fixes are pinned in overrides. Audit dependencies when updating them; clearing every remaining advisory requires a separately tested framework upgrade.
The website CI builds the export and runs browser checks against those static files. It checks navigation, search, copy buttons, the screenshot gallery, responsive layouts, and missing pages.