---
title: wgw-deploy docs
description: Publish static output to live and pinned revision URLs.
---

# wgw-deploy

`wgw-deploy` publishes a static directory or a single file to public URLs. A deploy gets two URLs:

- `live`: the stable project URL, updated to the newest revision.
- `pinned`: an immutable URL for the exact revision that was deployed.

Run it from a project that already has static output:

```sh
npx wgw-deploy
```

By default, the CLI uses the current working directory as the project root and deploys the `dist` directory. Use `--cwd` to point at another project root and `--dir` to deploy a different output path.

```sh
npx wgw-deploy --dir public
npx wgw-deploy --cwd /path/to/app --dir build
```

## What it is for

Use `wgw-deploy` when you need to share generated static output without setting up a separate hosting project:

- app previews
- generated documentation
- reproduction cases
- dashboards and reports
- static exports from build tools

The deploy target can be a directory or one file. Directories are uploaded as static assets. For a single-file deploy, the file is uploaded as the deploy content and the service adds an index page when the manifest does not already contain one.

## What stays stable

The live URL stays tied to the local project identity. That identity is derived from:

- the resolved current working directory, or `--cwd`
- the deploy directory, or `--dir`

With the defaults, rerunning `npx wgw-deploy` from the same project updates the same live URL. Changing the working directory or deploy directory creates a different local project identity.

Each upload also gets a revision ID. The pinned URL points at that revision and does not move when later deploys update the live URL.

## Next steps

- [Getting started](./getting-started)
- [Concepts](./concepts)
