GitHub Action to get your site indexed on Google in less than 48 hours based on goenning/google-indexing-script by @goenning.1
You can read more about the motivation behind it and how it works in this blog post.
- Follow this guide from Google. By the end of it, you should have a project on Google Cloud with the Indexing API enabled and a service account with the
Owner
permission for your sites. - Make sure to enable both the
Google Search Console API
and theWeb Search Indexing API
via Google Project > API Services > Enabled API & Services. - Download the JSON file containing the credentials for your service account. Create a secret in your GitHub repository with the content of this file (see Creating secrets for a repository).
- uses: robingenz/[email protected]
with:
# The domain or site URL of the site to be indexed.
# Required.
siteUrl: ''
# The GCP service account key in JSON format.
# Required.
gcpServiceAccountKey: ''
name: Google Indexing
on:
schedule:
- cron: '0 0 * * *'
jobs:
google-indexing:
runs-on: ubuntu-latest
steps:
- uses: robingenz/[email protected]
with:
siteUrl: 'example.tld'
gcpServiceAccountKey: ${{ secrets.GCP_SA_KEY }}
See LICENSE.
Footnotes
-
This project is not affiliated with, endorsed by, sponsored by, or approved by Google LLC or any of their affiliates or subsidiaries. ↩