A GitHub Action to measure web page SEO friendliness. Binoculars extends Google's Lighthouse to provide a more opinionated, SEO specific audit. Use Binoculars for SEO integration testing or just a piece of mind. Simple implementation or advanced customization including Slack notifications, AWS S3 HTML report uploads, and more!
- Run a single audit or multiple audits at once.
- Upload reports to S3 via simple configuration.
- Automatically post results as comments in GitHub via commits or pull requests (see options).
- Automatically post results in Slack (see options).
Screenshots below for visual look at the things you can do.
Name | Description | Run Type | Default |
---|---|---|---|
accessToken |
Access token of a user (to do things like post PR comments for example). | string |
undefined |
author |
For Slack notifications: A user handle, typically from GitHub. | string |
undefined |
awsAccessKeyId |
The AWS accessKeyId for an S3 bucket. |
string |
undefined |
awsBucket |
The AWS Bucket for an S3 bucket. |
string |
undefined |
awsRegion |
The AWS region for an S3 bucket. |
string |
undefined |
awsSecretAccessKey |
The AWS secretAccessKey for an S3 bucket. |
string |
undefined |
branch |
For Slack notifications: A version control branch, typically from GitHub. | string |
undefined |
commentUrl |
An endpoint to post comments to. This is only needed if you want to trigger comments on push . A pull_request trigger does not require this to be set. Typically this will be from GitHub's API. Example: https://api.github.com/repos/:owner/:repo/commits/:commit_sha/comments . |
string |
pull_request triggered actions populate this under the hood by default |
enableComments |
If true and accessToken is set scores will be posted as comments. |
boolean |
false |
minScore |
The required minimum score. If score is lower an error will throw. | number |
undefined |
outputDirectory |
An absolute directory path to output report. You can do this an an alternative or combined with an S3 upload. | string |
undefined |
sha |
For Slack notifications: A version control sha , typically from GitHub. |
string |
undefined |
slackWebhookUrl |
A Slack Incoming Webhook URL to send notifications to. | string |
undefined |
urls |
A pipe separated list of URLs to be audited (| ). |
string |
undefined |
A stringified array of objects with of the below shape.
Name | Description | Type |
---|---|---|
localReport |
A local path to the report (if applicable). | string |
result |
A comprehensive result - the equivalent of what is returned when using the lighthouse module directly. |
object |
report |
A URL to the report HTML file. | string |
name: Binoculars
on: [pull_request]
jobs:
binoculars:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: mkdir /tmp/artifacts
- name: Run Binoculars
uses: foo-software/binoculars-action@master
with:
accessToken: ${{ secrets.BINOCULARS_GITHUB_ACCESS_TOKEN }}
author: ${{ github.actor }}
awsAccessKeyId: ${{ secrets.BINOCULARS_AWS_ACCESS_KEY_ID }}
awsBucket: ${{ secrets.BINOCULARS_AWS_BUCKET }}
awsRegion: ${{ secrets.BINOCULARS_AWS_REGION }}
awsSecretAccessKey: ${{ secrets.BINOCULARS_AWS_SECRET_ACCESS_KEY }}
branch: ${{ github.ref }}
enableComments: true
minScore: 80
outputDirectory: /tmp/artifacts
urls: 'https://www.foo.software|https://www.foo.software/lighthouse'
sha: ${{ github.sha }}
slackWebhookUrl: ${{ secrets.BINOCULARS_WEBHOOK_URL }}
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: Binoculars reports
path: /tmp/artifacts
This package was brought to you by Foo - a website performance monitoring tool. Create a free account with standard performance testing. Automatic website performance testing, uptime checks, charts showing performance metrics by day, month, and year. Foo also provides real time notifications. Users can integrate email, Slack and PagerDuty notifications.