---
title: "Build and Ship Astro Sites with Deno and Deno Deploy"
description: "Astro sites can be built with the Deno runtime and hosted on Deno Deploy in two modes."
url: "https://swe.quest/articles/build-and-ship-astro-sites-with-deno-and-deno-deploy-3be8936cebaf2b24"
canonical: "https://deno.com/blog/astro-on-deno"
source: "Deno"
published: "2023-07-21"
difficulty: "medium"
kind: "How-to"
reading_minutes: 12
tags: ["frontend","serverless","deployment","typescript"]
---

# Build and Ship Astro Sites with Deno and Deno Deploy

A post on [Deno](https://swe.quest/sources/deno.md), published 2023-07-21, 12 min read, How-to. Original: [https://deno.com/blog/astro-on-deno](https://deno.com/blog/astro-on-deno)

## Summary

Astro sites can be built with the Deno runtime and hosted on Deno Deploy in two modes. Static output from \`npm run build\` is served via the Deno standard library file server and auto-deployed from GitHub Actions. Server-rendered apps use Astro's \`output: "server"\` mode with a Deno adapter, a generated \`server/entry.mjs\` entrypoint, and npm scripts rewritten to run Astro through \`deno run -A --unstable npm:astro\`. A template app shows SSR form handling in component scripts, client-side delete calls to an API route, and data persistence that can be switched to Deno KV.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)

## Prerequisites

- JavaScript/TypeScript basics ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- npm package management ([easy posts on Engineering management](https://swe.quest/tags/engineering-management.md?difficulty=easy))
- GitHub Actions basics ([easy posts on CI/CD](https://swe.quest/tags/ci-cd.md?difficulty=easy))

## Keywords

Astro, Deno, Deno Deploy, Deno KV, deployctl, GitHub Actions

## Related posts

- [Build an Astro site with Deno](https://swe.quest/articles/build-an-astro-site-with-deno-cd90d47e8a2fd029.md): Deno · 2024-10-29 · Medium · 4 min read · Frontend, JavaScript, TypeScript
  Deno 2's Node and npm compatibility lets you scaffold and run an Astro project entirely with Deno tooling: \`deno -A npm:create-astro@latest\` to scaffold, \`deno install --allow-scripts\` for dependencies, and \`deno task dev\` to run package.json scripts.
- [Build Your Own Cloud IDE with the Subhosting API](https://swe.quest/articles/build-your-own-cloud-ide-with-the-subhosting-api-182e8468c60d1771.md): Deno · 2024-01-16 · Medium · 10 min read · Serverless, TypeScript, Developer tools, API design
  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.
- [A Whole Website in a Single JavaScript File](https://swe.quest/articles/a-whole-website-in-a-single-javascript-file-71d46431d0988f5b.md): Deno · 2022-04-05 · Medium · 2 min read · JavaScript, Serverless, CDN & edge, Frontend, TypeScript
  A demo multi-page website fits entirely in one JavaScript file and is server-rendered on demand at the edge with Deno.
- [Manage your Deno Deploy and Deno Subhosting projects with Terraform](https://swe.quest/articles/manage-your-deno-deploy-and-deno-subhosting-projects-with-terraform-699764d70221ef58.md): Deno · 2023-12-05 · Medium · 6 min read · Infrastructure as code, Serverless, Deployment, TypeScript
  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.
- [Build a dinosaur runner game with Deno, pt. 1](https://swe.quest/articles/build-a-dinosaur-runner-game-with-deno-pt-1-e4d3faa91fec67fd.md): Deno · 2025-12-08 · Medium · 5 min read · JavaScript, TypeScript, Deployment, Serverless
  Part one of a series building a browser dinosaur runner game sets up a Deno project that serves static files and deploys it.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
