> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ankra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ankra pages

> Host static sites on Ankra Pages

## ankra pages

Deploy a folder, a single file or a zip as a static site at
https\://\<site>.\<pages domain>, and manage the sites of your organisation.

```bash theme={null}
ankra pages deploy ./dist --site docs
ankra pages deploy report.html
ankra pages deployments docs
ankra pages rollback docs
```

Every deploy is kept. An alias names the deployment it serves: production
answers at the site's own address, any other alias at
https\://\<alias>--\<site>.\<pages domain>. Deploy with `--alias` preview to try a
change, then 'ankra pages promote docs `--from` preview' to put it live, and
'ankra pages rollback docs' to go back.

Set the audience on a Pages edge with access controls by including a root
\_access file in the deployed folder. Use organisation for members of the owning
organisation through Ankra SSO, or public for anyone with the URL. A private
production site also restricts its previews. Without a marker the managed edge
requires organisation sign-in. A self-hosted edge uses its configured default,
which can be public.

## ankra pages delete

Delete a site, its aliases and every deployment of it. Its addresses stop
serving at once, and its name becomes free for any organisation to take.

```bash theme={null}
ankra pages delete <site> [flags]
```

**Examples**

```bash theme={null}
ankra pages delete docs
ankra pages delete docs --yes
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `--yes` | `false` | Skip the confirmation prompt |

## ankra pages deploy

Deploy a folder, a single file or a zip and print the address it answers at.

A folder deploys every file under it by its path. A single HTML file deploys
as the site's index.html; any other file deploys under its own name and the
printed address points at it. A zip deploys its entries, and when every entry
sits in one folder (what zipping a folder produces) that folder is dropped.
Hidden files and folders (except .well-known), the metadata macOS adds and
node\_modules are left out, and named on stderr. A .jsx or .tsx component is
refused: build it and deploy the output folder.

The site is named with `--site`, or after the folder or file. It is created on
the first deploy. The deployment goes live under `--alias`, production unless
given.

Each file is hashed before anything is sent. A small site goes in one request;
a larger one declares its files by hash and uploads only those your
organisation does not hold yet, a few at a time, straight to storage.

The address is printed last, on its own line, so scripts can take the final
line of output; with -o json the deployment is printed as a JSON document
instead.

```bash theme={null}
ankra pages deploy <folder|file|zip> [flags]
```

**Examples**

```bash theme={null}
ankra pages deploy ./dist --site docs
ankra pages deploy ./dist --site docs --alias preview
ankra pages deploy report.html
URL=$(ankra pages deploy site.zip --site handbook | tail -n 1)
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `--alias` | `production` | Alias the deployment goes live under |
| `-o`, `--output` | | Output format: json or yaml (default: human-readable) |
| `--site` | | Site to deploy to, created when it does not exist (default: the folder or file name) |

## ankra pages deployments

List a site's newest deployments, newest first, with the aliases that
serve each one now. ALIAS is the alias a deployment was made for; SERVING is
where it is live.

```bash theme={null}
ankra pages deployments <site> [flags]
```

**Examples**

```bash theme={null}
ankra pages deployments docs
ankra pages deployments docs --limit 100
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `--limit` | `0` | Number of deployments to list, at most 100 (default: the platform's page size) |
| `-o`, `--output` | | Output format: json or yaml (default: human-readable) |

## ankra pages get

Show a site and the deployment each of its aliases serves

```bash theme={null}
ankra pages get <site> [flags]
```

**Examples**

```bash theme={null}
ankra pages get docs
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `-o`, `--output` | | Output format: json or yaml (default: human-readable) |

## ankra pages list

List your organisation's sites

```bash theme={null}
ankra pages list [flags]
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `-o`, `--output` | | Output format: json or yaml (default: human-readable) |

## ankra pages promote

Point the site's production alias at the deployment another alias serves
now, and print the production address. The other alias keeps serving it.

```bash theme={null}
ankra pages promote <site> --from <alias> [flags]
```

**Examples**

```bash theme={null}
ankra pages deploy ./dist --site docs --alias preview
ankra pages promote docs --from preview
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `--from` | | Alias whose deployment goes live in production |
| `-o`, `--output` | | Output format: json or yaml (default: human-readable) |

## ankra pages rollback

Point the site's production alias back at an earlier deployment and print
the address.

Without `--to` it returns to the newest ready deployment made for production
before the one production serves now, which after deploys alone is what
production served before. The platform records where each deployment was
made, not every place an alias has pointed, so a second rollback steps back
once more, and a deployment that reached production only by 'promote' is
not chosen: name it with `--to`.

```bash theme={null}
ankra pages rollback <site> [flags]
```

**Examples**

```bash theme={null}
ankra pages rollback docs
ankra pages rollback docs --to 0b7c4d0a-5f6a-4b8c-9d0e-1f2a3b4c5d6e
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `-o`, `--output` | | Output format: json or yaml (default: human-readable) |
| `--to` | | Deployment id to return production to (default: the production deployment before the current one) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.