Getting Started with Previewops

Previewops automatically deploys pull-request previews to your cloud account. Comment /deploy-previewops on any PR and the bot builds your Docker image, deploys it, and replies with the live URL — all within minutes.


How it works

  1. You (or a teammate) comment /deploy-previewops on a pull request.
  2. Previewops builds a Docker image from the PR branch (via Cloud Build, SSH, or your provider's native build, depending on configuration).
  3. The image is deployed to your chosen cloud provider (Cloud Run, Fly.io, Hetzner, etc.).
  4. Previewops posts a comment on the PR with the preview URL.
  5. When the PR is merged or closed, Previewops deletes the preview automatically.
  6. Previews also expire automatically after their TTL (default: 24 hours).

Prerequisites

  1. GitHub App installed on your organisation or repository. Install Previewops →
  2. Cloud credentials stored (required for Free and Premium BYOC plans). See credentials.md.
  3. A Dockerfile in your repository root (or configured via .previewops.yaml).

Your first deploy

Step 1 — Install the GitHub App

Go to the Previewops GitHub App page and install it on your organisation or the specific repositories you want to enable.

Step 2 — Store your cloud credentials (BYOC plans)

If you are on the Free or Premium BYOC plan, you need to add your cloud provider credentials before your first deploy. See credentials.md for a step-by-step walkthrough.

Pro, Enterprise, and Custom plan users can skip this step — Previewops handles the cloud account for you.

Step 3 — Open a pull request and deploy

Comment on any open PR in an enabled repository:

/deploy-previewops

Previewops will reply with a "building…" comment, then update it with the live preview URL once the deploy completes (typically 2–5 minutes depending on build time).

Step 4 — (Optional) Configure per-repo settings

Add a .previewops.yaml file to the root of your repository to customise TTL, concurrency, the Dockerfile path, and more. See configuration.md for all available options.


Next steps