Connect GitHub Copilot

Supercharge your AI workflow by automatically deploying Copilot's code suggestions to a live URL.

Why connect Copilot?

GitHub Copilot is excellent at suggesting code, but verify it works in a real environment is still a manual process. By connecting PrevHQ, every time you or Copilot pushes a change, we build a preview environment instantly.

Pro Tip: This integration works seamlessly with Copilot Workspace and standard Copilot usage.

Step 1: Install the PrevHQ GitHub App

To get started, you need to grant PrevHQ access to your repositories so it can listen for pull requests and pushes.

  1. Log in to your PrevHQ Dashboard.
  2. Navigate to Integrations > GitHub.
  3. Click Install App.
  4. Select the repositories you want to use with PrevHQ (or select "All Repositories").

Step 2: Configure Your Project

PrevHQ needs to know how to build your application. We attempt to auto-detect this, but a config file ensures accuracy.

Create a prevhq.json in the root of your repository:

{ "buildCommand": "npm run build", "outputDirectory": "dist", "framework": "nextjs" }

Step 3: Let Copilot Code

Now, just work as usual. Ask Copilot to write a feature:

// User: Write a React component for a newsletter signup form using Tailwind CSS.

When you commit and push this code (or when Copilot Workspace opens a PR), PrevHQ kicks in.

Step 4: See the Magic

Within seconds, the PrevHQ Bot will comment on your Pull Request or Commit:

PrevHQ Verified Bot

Preview Live: https://newsletter-signup-x94.onprev.com