Skip to content
User guide menu GitHub Actions Pages

GitHub Actions

Audit your site from GitHub Actions after every deploy, see the score in the job summary, and fail the build when the score drops.

Plans
Pro and up
Updated
On this page
  1. Set it up
  2. When the build fails
  3. What you get in each run

Add one step to a GitHub workflow and seoscore audits your site after every deploy. The score and the biggest fixes appear in the run's summary, and the build fails if the score drops further than you allow, so an SEO slip never reaches your visitors unnoticed.

Set it up

The quickest way is Settings › Integrations › GitHub Actions in the app, which writes the workflow for your site. It takes about two minutes per repository:

  1. Create an API key. On the API keys page, create a key named GitHub Actions with the audits ability, and copy it. See API and API keys.
  2. Save it in GitHub. In your repository, open Settings › Secrets and variables › Actions, and add a repository secret named SEOSCORE_API_KEY.
  3. Add the workflow. Copy the workflow from the setup page into .github/workflows/seoscore.yml. It audits after each successful production deploy your host reports to GitHub, every Monday morning, and whenever you run it from the Actions tab.

If you already deploy from a workflow, add the audit as a step after your deploy step instead:

- name: SEO audit
  uses: x2c/seoscore-action@v1
  with:
    api-key: ${{ secrets.SEOSCORE_API_KEY }}
    url: https://example.com
    max-drop: 5      # fail when the score falls more than 5 points
    min-score: 0     # or fail below a score, e.g. 70

When the build fails

SettingDefaultWhat it does
max-drop5Fails when the score fell by more than this many points since the site's previous audit.
min-score0Fails when the score is below this, such as 70. 0 never fails on the score alone.
wait-minutes10How long to wait for the audit to finish before failing.

The build also fails if the audit can't reach your site, with the reason in the log.

What you get in each run

  • The score out of 100 and its change since the site's last audit.
  • Each area's points and the five fixes worth the most.
  • A link to the full report. The audit also appears in your site's history in the app.
  • Outputs for later steps, such as score, change and report-url, for example to post a Slack message.

The action is x2c/seoscore-action@v1.

Try it on your own site. The Free plan needs no card.

Get my free score