GitHub deployments are webhook events triggered by GitHub whenever a deployment service reports a successful deployment event. This works out-of-the-box with the following services.
Any (SaaS) service that interacts with the GitHub deployments API and reports the correct “success” message will work.
Setting up your GitHub integration
Go to the integrations tab in your account settings and click the “Integrate with GitHub” button.
You will be redirected to GitHub and prompted to select an account and install the Checkly GitHub App.
When accepting the installation, you are redirected back to Checkly and the integration is installed. Now, go to the CI/CD tab of the check you want to link to a GitHub repository.
Click the “Link GitHub repo” button and select the repository you want to link.
On each deployment event, we will run your check and report the results directly in your GitHub timeline and PR overview.
You will also get an overview of the check result in the details section
Using environment URLs
GitHub reports an environment URL on each deployment event. Depending on what deployment service you use, this environment URL can be used to run your check on different target environments than configured in your check.
The primary use case for this is validating temporary review/branch deployments, such as those provided by Vercel and Heroku Pipelines, before going to production.
So, when you enable the “Use environment URL from deployment trigger” checkbox there are two scenarios:
API checks & environment URLs
With API checks, we replace the hostname part of your request url with the host in the environment URL. For example:
- Your configured URL:
- Environment URL:
- Replaced URL:
Notice we only replace the host part, not the URL path or any query parameters.
Browser checks & environment URLs
For browser checks, the environment URL is exposed as the
ENVIRONMENT_URL environment variable. This means you can use that
variable in your code to replace any hardcoded URL you might have, i.e.:
const puppeteer = require('puppeteer') const browser = await puppeteer.launch() const page = await browser.newPage() const myURL = process.env.ENVIRONMENT_URL || 'https://acme.com' await page.goto(myURL) await browser.close()
const playwright = require('playwright') const browser = await playwright.chromium.launch() const page = await browser.newPage() const myURL = process.env.ENVIRONMENT_URL || 'https://acme.com' await page.goto(myURL) await browser.close()