---
name: "Publish to BrewPage"
description: "Publish a test report, HTML or Markdown page, file or static site from a build step to BrewPage and get a shareable link."
author: "kochetkov-ma"
repo: "brewpage-buildkite-plugin"
stars: 0
official: false
version: "v1.0.0"
lastUpdated: "2026-11-16T15:40:23.000Z"
---

# Publish to BrewPage Buildkite Plugin

Publish a test report, HTML or Markdown page, file or static site from a Buildkite step to [BrewPage](https://brewpage.app) and get a shareable link. Free, fast, no sign-up and no API key; agent-friendly REST API.

The plugin runs after your step command (`post-command` hook), uploads the path with `curl`, prints the link, stores it in build meta-data as `brewpage-link` and adds an annotation with the link.

## Example

Publish an HTML test report, even when the tests fail:

```yaml
steps:
  - label: ":test_tube: Tests"
    command: npm ci && npx playwright test
    plugins:
      - kochetkov-ma/brewpage#v1.0.0:
          path: playwright-report
```

Publish one file as a public page, listed in the BrewPage gallery and searchable:

```yaml
steps:
  - label: ":memo: Docs"
    command: ./build-docs.sh
    plugins:
      - kochetkov-ma/brewpage#v1.0.0:
          path: docs/guide.md
          namespace: public
          tags: docs,guide
```

Read the link in a later step:

```bash
buildkite-agent meta-data get brewpage-link
```

## Configuration

### `path` (required, string)

File, directory or `.zip` to publish. A directory becomes a static site; an `.html` or `.md` file becomes a page; anything else (PDF, image, archive, text) is served as a file.

### `kind` (optional, `auto` | `file` | `site`, default `auto`)

`auto` publishes a directory as a site and anything else as a file. Use `site` to publish a `.zip` as a static site.

### `namespace` (optional, string)

Empty (default): private, unlisted and not indexed; anyone who has the link can still open it. `public`: listed in the public gallery and the sitemap, so search engines and people can find it. Never publish secrets, tokens or personal data to `public`.

### `ttl` (optional, integer)

Days the publication stays; a server default applies when omitted. Limits: up to 30 days without an account, up to 90 with a free profile.

### `tags` (optional, string)

Comma-separated tags.

### `entry` (optional, string)

Site entry file; default `index.html` at the site root.

### `owner-token-env` (optional, string, default `BREWPAGE_OWNER_TOKEN`)

Name of the environment variable that holds your owner token. With a token, every publication of your pipelines belongs to one owner you can manage at [account.brewpage.app](https://account.brewpage.app). Mint one with `curl -fsS https://brewpage.app/api/owner-token` and keep it in your secrets manager. Without it each publication still gets its own manage link.

### `password-env` (optional, string, default `BREWPAGE_PASSWORD`)

Name of the environment variable that holds an access password (at least 4 characters). Protected publications are hidden from the gallery.

### `show-manage-url` (optional, boolean, default `true`)

Print the manage link in the log. Anyone who has it can edit or delete the publication: set `false` when your build logs are public.

### `annotate` (optional, boolean, default `true`)

Add a build annotation with the link.

### `api-url` (optional, string, default `https://brewpage.app`)

BrewPage base URL.

## Requirements

`bash`, `sh` and `curl` on the agent; `jq` is used when present.

## Developing

```bash
docker run --rm -v "$PWD:/plugin:ro" buildkite/plugin-tester:v5.0.0
docker run --rm -v "$PWD:/plugin:ro" buildkite/plugin-linter:v3.2.0 --id kochetkov-ma/brewpage
```

## Links

- [brewpage.app](https://brewpage.app), [API guide for agents](https://brewpage.app/llms.txt), [OpenAPI docs](https://kochetkov-ma.github.io/brewpage-openapi/)
- [Publish to BrewPage GitHub Action](https://github.com/kochetkov-ma/brewpage-action)

## License

MIT