Deno Deploy

Deploy Nitro apps to Deno Deploy.

Preset: deno_deploy

Read more in Deno Deploy.

Deploy with the CLI

You can use deployctl to deploy your app.

Login to Deno Deploy to obtain a DENO_DEPLOY_TOKEN access token, and set it as an environment variable.

# Build with the deno_deploy preset
NITRO_PRESET=deno_deploy npm run build

# Make sure to run the deployctl command from the output directory
cd .output
deployctl deploy --project=my-project server/index.ts

Deploy within CI/CD using GitHub Actions

Include the deployctl GitHub Action as a step in your workflow.

No secrets are required, but you do need to link your GitHub repository to your Deno Deploy project and choose the "GitHub Actions" deployment mode in your project settings on Deno Deploy.

Create the following workflow file in your .github/workflows directory:

.github/workflows/deno_deploy.yml
name: deno-deploy

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - run: corepack enable
      - uses: actions/setup-node@v6
        with:
          node-version: 20
          cache: pnpm
      - run: pnpm install
      - run: pnpm build
        env:
          NITRO_PRESET: deno_deploy
      - name: Deploy to Deno Deploy
        uses: denoland/deployctl@v1
        with:
          project: my-project
          entrypoint: server/index.ts
          root: .output

Deno runtime

Read more in Deploy > Runtimes > Deno.