Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Deno 6 min read Announcement mediumAdept

Static Files on Deno Deploy

Deno Deploy now stores static files alongside deployed code and distributes them to edge locations, where edge code reads them via Deno file system APIs (readFile, readDir, open, stat, etc.) or fetch. Because user code still controls responses, static assets can be auth-gated, given CORS headers, rewritten dynamically or streamed, and std's serveFile or oak handle Content-Type and Range requests. Files come from a linked GitHub repo automatically, or from build output uploaded with deployctl or a GitHub Action using OIDC without secrets. A Lume static site example deploys in about 25 seconds from push, 15 of which is runner startup; automatic mode deploys take 1-10s.

Assumes: JavaScript/TypeScript basicsHTTP request/response handling

Related posts

  • How to setup a blog with Hugo and Deno Deploy

    Deno mediumAdept

    A Hugo static site can be published on Deno Deploy by building it in GitHub Actions and serving the generated public directory with Deno's standard-library file server, imported directly by URL with no download or compile step. The walkthrough covers installing Hugo, adding the ananke theme as a git submodule, creating posts, linking a GitHub repo to a Deno Deploy project in GitHub Actions mode, and a complete workflow YAML using peaceiris/actions-hugo and denoland/deployctl. Any static site generator works the same way, since Deno Deploy only needs to serve the built HTML files.

  • Build Your Own Cloud IDE with the Subhosting API

    Deno mediumAdept

    A cloud IDE can be built on the Deno Subhosting API, which programmatically deploys user code to Deno Deploy's global V8 isolate cloud within seconds. The walkthrough builds a Hono server with routes to list and create projects and deployments, plus a small TypeScript client that wraps the Subhosting REST endpoints with bearer-token auth. It also covers a server-rendered JSX page and an Ace Editor frontend that polls deployment status every five seconds. The deployment payload is explained in detail: entryPointUrl must map to a key in an assets map of files, and envVars inject credentials into the deployed code.

  • Which serverless edge platform has the fastest git deployments?

    Deno mediumAdept

    A push-to-live benchmark of git deployments across edge platforms, timed with a Deno script that pushes to main and polls the site until a marker string appears. Cloudflare Workers (~60s, mostly edge propagation after a 22s GitHub Action), Fly.io (~57s, mostly flyctl Docker image builds) and a Next.js site on Vercel (~54s, mostly build) all land near a minute. A later update deploying only a Vercel edge function brought the median to about 12.6s. Deno Deploy went live in 3.5s, which the vendor attributes to uploading code directly and running it in V8 isolates instead of provisioning VMs or containers. AWS Lambda@Edge was not measured because wiring CloudFront triggers via GitHub Actions proved difficult.

  • Manage your Deno Deploy and Deno Subhosting projects with Terraform

    Deno mediumAdept

    Deno now ships an official Terraform provider (denoland/deno) for managing Deno Deploy and Deno Subhosting projects, custom domains and deployments as infrastructure-as-code. A walkthrough deploys a local TypeScript server with a static asset: configure the provider with an organization ID and token (or DENO_DEPLOY_ORGANIZATION_ID/DENO_DEPLOY_TOKEN env vars), create a deno_project, collect files via the deno_assets data source with a root path and glob pattern, then define a deno_deployment with an entry point and env vars. Running terraform plan and apply creates the resources, and terraform state show reveals the deployment's deno.dev URL. The provider is pitched as simpler than calling the Subhosting API directly when coordinating hundreds of projects.

  • Run npm and Deno anywhere

    Deno mediumAdept

    Deno apps, including those using npm specifiers, can be containerized with the official denoland/deno Docker image and deployed to any VPS or container platform, not just Deno Deploy. A shared Oak-based main.ts, Dockerfile and docker-compose.yml are built locally, then pushed and run on AWS Lightsail via Docker Hub, on a Digital Ocean Droplet via its container registry and docker run, and on Google Cloud Run via Artifact Registry and gcloud run deploy. npm specifiers were not yet supported on Deno Deploy at the time.

The quest for software engineering knowledge.

Look:
Layout: