Skip to main content

Overview

When you connect a GitHub repo to a Canvas app, every pull request gets its own preview deployment at a unique URL. Reviewers can test changes live before merging, with no manual deploy.

How it works

  1. Open a PR targeting your app’s connected branch
  2. GitHub sends a pull_request webhook to Canvas
  3. Canvas clones the PR’s head branch, builds it, and deploys to a preview environment
  4. The preview is live at https://pr-{N}-{slug}.mxp.co
  5. Push more commits to the PR. The preview auto-updates
  6. Close or merge the PR. The preview environment is cleaned up

Preview URLs

Preview deploys follow a predictable URL pattern: Preview environments are fully functional. They use the same API proxy, auth configuration, and environment variables as your production app.

Setup

Preview deploys work automatically once your repo is connected. No additional configuration is needed.
1

Connect your repo

2

Open a pull request

Open a PR targeting the connected branch (e.g., main). Canvas automatically detects the PR and starts building.
3

Review the preview

Visit https://pr-{N}-{slug}.mxp.co to see the live preview. The URL is also posted as a GitHub deployment status on the PR.

Supported webhook events


Preview vs staging vs production

Each preview environment is independent, so multiple PRs can have active previews simultaneously.

Cleanup

When a PR is closed (merged or not), Canvas automatically:
  1. Removes the preview environment from the app’s configuration
  2. Deletes preview assets from S3
No manual cleanup is needed.