Skip to content
Back to skills

Deploy

ASecurity

Manage Deno Deploy cloud services using both `deno deploy` and `deployctl`. Use this skill for deploying projects, managing Build/Dev/Prod environments, monitoring logs, and troubleshooting issues like private npm dependencies.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentsgobashawsgcpdebugginggitapici/cd

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned September 20, 2026

npx -y skills add korchasa/flowai --skill deploy --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Deploy?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Deploy
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/korchasa-deploy/badge)](https://www.skillsdirectory.com/skills/korchasa-deploy)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: deploy
description: Manage Deno Deploy cloud services using both `deno deploy` and `deployctl`. Use this skill for deploying projects, managing Build/Dev/Prod environments, monitoring logs, and troubleshooting issues like private npm dependencies.
---

# Deno Deploy

This skill covers managing Deno Deploy cloud services using the built-in `deno deploy` command and the advanced `deployctl` utility.

## Core Concepts (Deno 2.x / 2026)

- **Integrated Build System**: Deno Deploy now handles builds (install + build steps) on its own infrastructure with automatic caching and live logs.
- **Deployment Contexts**: Environment variables and configurations are separated into **Production**, **Development** (Preview/Branch), and **Build** contexts.
- **Runtime Permissions**: Applications run with `--allow-all` by default, supporting subprocesses, FFI, and full npm compatibility.
- **Static Assets**: First-class support for static files (Vite, SSG) which are automatically cached by the Deno Deploy CDN.

## Built-in `deno deploy`

The `deno deploy` command is integrated into the Deno CLI and is suitable for basic deployment tasks.

### Commands
- `deno deploy [OPTIONS] [entrypoint]`: Deploy the project. If `entrypoint` is omitted, it's guessed from `deno.json` or files.
- `deno deploy create`: Create a new application.
- `deno deploy env`: Manage environment variables in the cloud (supports contexts).
- `deno deploy logs`: Stream live logs from a deployed application.
- `deno deploy switch`: Switch between organizations and applications.
- `deno deploy sandbox`: Interact with sandboxes.
- `deno deploy setup-aws` / `setup-gcp`: Configure cloud connections (OIDC).
- `deno deploy logout`: Revoke the Deno Deploy authentication token.

---

## Advanced Management via `deployctl`

For more granular control, including listing deployments and managing projects, use `deployctl`.

### Installation
```bash
deno install -gArf jsr:@deno/deployctl
```

### Projects and Deployments
- `deployctl list`: List all deployments for the current project.
- `deployctl projects list`: List all projects in your account.
- `deployctl deployments show <id>`: Show detailed information for a specific deployment/build.
- `deployctl redeploy --deployment=<id>`: Roll back or redeploy a specific version.
- `deployctl projects create <name>`: Create a new project.
- `deployctl projects delete <name>`: Delete a project.

---

## Troubleshooting & Best Practices

### Local Debugging Protocol (CRITICAL)
**ALWAYS** test deployment commands locally before updating CI/CD workflows.
1. Use the same token as in CI/CD.
2. Verify file uploading and revision creation.
3. Check for `IsADirectory` errors (often caused by missing `.gitignore` entries like `.playwright-browsers/`).

### Unstable APIs (Deno KV, etc.)
If your app uses `Deno.openKv()` or other unstable APIs:
- **Local run**: Requires `--unstable-kv`.
- **Deno Deploy (CLI)**: The `deno deploy` command **DOES NOT** support `--unstable-kv` or `--unstable` flags.
- **Deno Deploy (Runtime)**: You **MUST** enable unstable features in `deno.json`:
  ```json
  {
    "unstable": ["kv"]
  }
  ```
  Without this, the app will fail with `TypeError: Deno.openKv is not a function` in the cloud.

### Exclusions and File Management
- **Native CLI**: `deno deploy` **DOES NOT** support the `--exclude` flag.
- **Solution**: Use `.gitignore` to exclude files and directories. All files not ignored by git will be uploaded.
- **Large Directories**: Always exclude large local-only directories (like `.playwright-browsers/`) to avoid `IsADirectory` errors and slow uploads.

### CI/CD with GitHub Actions
Recommended workflow for complex projects:
1. **Permissions**: If using OIDC (automatic auth), ensure correct permissions:
   ```yaml
   permissions:
     id-token: write
     contents: read
   ```
2. **Native CLI**: Prefer native `deno deploy` over `deployctl` Action if you encounter authorization issues (`The bearer token is invalid`).
3. **Explicit Entrypoint**: Always specify the entrypoint file to avoid guessing errors in CI.
   ```yaml
   - name: Upload to Deno Deploy
     run: deno deploy --app=my-app --token=${{ secrets.DENO_DEPLOY_TOKEN }} --prod main.ts
   ```

### Private Dependencies (npm/JSR)
Deployments from local console may fail with `Internal Server Error` if the project uses private npm packages.
- **Cause**: Deno Deploy build servers cannot access your local private registry credentials.
- **Solution**: Use **GitHub Actions**. It can authenticate against private registries before deploying.

## Common Workflows

### Deploying to Production (Explicit)
```bash
deno deploy --app=my-app --prod main.ts
```

### Managing Environment Variables
```bash
deno deploy env set MY_VAR=value --context=production
```

Files in this skill

  • SKILL.md4.7 KB
  • acceptance-tests/deploy-troubleshoot/fixture/.gitignore14 B
  • acceptance-tests/deploy-troubleshoot/fixture/deno.json229 B
  • acceptance-tests/deploy-troubleshoot/fixture/src/main.ts484 B
  • acceptance-tests/deploy-troubleshoot/mod.ts1.7 KB
  • acceptance-tests/trigger-adj-1/mod.ts868 B
  • acceptance-tests/trigger-false-1/mod.ts819 B
  • acceptance-tests/trigger-pos-1/mod.ts688 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.