Skip to main content
The Demomatic GitHub integration watches your repository for pull request activity and triggers demo regeneration automatically. Use it to keep your demos up to date as your product evolves — without manually re-running generation after every code change.

How it works

1

Install the GitHub App

Connect Demomatic to your GitHub account by installing the GitHub App on the repositories you want to watch.
2

Enable self-heal on a video

Mark individual videos with self_heal_on_pr: true. When a pull request event matches a connected repository, Demomatic regenerates those videos.
3

GitHub sends webhooks

When you open or merge a pull request, GitHub sends a webhook to Demomatic. Demomatic processes the event and queues demo regeneration jobs for matching videos.

Install the GitHub App

Navigate to the GitHub begin-install endpoint while authenticated. Demomatic creates a short-lived install intent and redirects you to GitHub’s app installation page:
GET /integrations/github/begin-install
After you approve the installation on GitHub, GitHub redirects back to Demomatic, which links the installed repositories to your account and redirects you to your settings page.
You must be signed in to your Demomatic account before initiating the install. The install intent expires after 15 minutes.

Enable auto-regeneration on a video

After installing the GitHub App, mark the videos you want to auto-update when a PR is opened or merged. Set self_heal_on_pr to true on the video:
curl -X PUT https://api.demomatic.tech/videos/456 \
  -H "Authorization: Bearer dm_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ "self_heal_on_pr": true }'
Only videos with self_heal_on_pr: true are included in GitHub-triggered regeneration runs.

Webhook events handled

Demomatic processes the following GitHub webhook events:
EventWhat Demomatic does
pull_requestTriggers demo regeneration for matching videos when a PR is opened or merged.
installationRemoves linked repositories when the GitHub App is uninstalled from an account.
installation_repositoriesAdds or removes repository links when repositories are added to or removed from the app installation.

Disconnect the GitHub integration

You can disconnect the GitHub App at any time. Use either endpoint: DELETE with query parameter:
curl -X DELETE "https://api.demomatic.tech/integrations/github/install?domain_id=42" \
  -H "Authorization: Bearer dm_your_key_here"
POST with request body:
curl -X POST https://api.demomatic.tech/integrations/github/disconnect \
  -H "Authorization: Bearer dm_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ "domain_id": 42 }'
Both endpoints require a domain_id to scope the request to the correct account. Disconnecting removes the GitHub integration for the entire account associated with that domain.
Disconnecting the GitHub integration stops all PR-triggered regeneration for your account. Videos with self_heal_on_pr: true will no longer update automatically until you reconnect.