Deployment Webhook
Every site on DeploymentHawk has a unique deployment webhook that can be used to trigger automated audits. It allows you to audit your site's monitored pages from the CLI, CI/CD pipelines, or third-party services.
You can find your site's deployment webhook on the site's Settings tab. Sending a POST
request to this URL will trigger an audit. There's also an example cURL command that you can use on the command line or in a shell script.
The cURL command should be enough for most use cases, but we have specific guides for some services:
#Git
If your site uses Git for version control, you can pass a branch and commit hash as part of the deployment webhook's payload. This is useful to see precisely what revision has been audited, allowing you to quickly see what code changes have impacted your Lighthouse scores. In cURL, this would look like this:
curl https://app.deploymenthawk.com/analyze/site/ID?token=TOKEN \
-X POST \
-H 'Accept: application/json' \
-d 'branch'='main' \
-d 'commit'='fda7c44c7ae0ee6ea28a6a7a91946deaef37adca'
To dynamically populate the branch and commit:
curl https://app.deploymenthawk.com/analyze/site/ID?token=TOKEN \
-X POST \
-H 'Accept: application/json' \
-d 'branch'="$(git rev-parse --abbrev-ref HEAD)" \
-d 'commit'="$(git rev-parse HEAD)"