As your site content begins to scale, keeping older content up to date can become difficult.
This guide contains instructions to setup a GitHub Actions Workflow to check for outdated content using AI and raise GitHub Issues.

We have a public repo with a GitHub action you can use out of the box for auditing your content. Follow the installation steps to set it up.

Enable GitHub Models for your repo:

You'll need to add configuration settings that will be used when the GitHub action is run. To configure the settings go to Your Repo | ⚙️Settings | Secrets and Variables.
Name | Description |
|---|---|
TINA_TOKEN | Your TinaCloud API Token. TinaCloud | <your-project> | Tokens | Content (Readonly) |
TINA_CLIENT_ID | The Tina Client ID for your project. You can find it in TinaCloud | Projects | <your-project> | ⚙️ Project Details | Client ID |
Name | Description |
|---|---|
TINA_AUDITOR_CONTENT_WINDOW | A number indicating how many outdated content items will be checked when you run the action. (e.g. 5) |
TINA_AUDITOR_EXPIRY_DAYS | The number of days that will pass before your content is re-evaluated being checked. |
TINA_AUDITOR_SYSTEM_PROMPT (optional) | The prompt that will be used to evaluate your content when passing it to GitHub model. |
TINA_AUDITOR_COLLECTION | The collection the audit query will be ran against. |
You may optionally override the default system prompt by providing your own as a GitHub variable. The value to override is TINA_AUDITOR_SYSTEM_PROMPT.
The default system prompt is as follows:
You are an expert content auditor. Your task is to review the provided markdown content and provide constructive feedback on its quality, clarity, relevance and engagement. You should highlight and suggest specific areas for improvement.
TinaCloud will be used to locate and filter your content. We'll need add a couple of fields to your selected collection to enable the content checks.
const MyCollection : Collection = {label: 'My Collection'name: 'myCollection'format: 'mdx'fields: [// new field{type: 'datetime',name: 'lastChecked',ui: {component: 'hidden',}},//...]}
Be sure to regenerate and commit yourtina-lock.jsonafter adding the new field.
In order for the script to run we need to seed all of you existing content with a lastChecked field.
Navigate to the directory for the workflow.
cd ./github/scripts/tina-helpers
You'll need to add a .env file inside this location with your Collection, Tina Token and Tina Client ID saved. These are the same properties added to your GitHub Settings.
TINA_TOKEN=<your-tina-token>TINA_CLIENT_ID=<your-tina-client-id>TINA_AUDITOR_COLLECTION=<your-tina-collection>
Then run the commands below to migrate your content.
pnpm installpnpm run migrate-content
The output should look something like this:
updated: content/posts/future-of-remote-work-2025.mdxupdated: content/posts/learning-about-components.mdxupdated: content/posts/june/learning-about-tinacloud.mdxupdated: content/posts/artificial-intelligence-explained.mdx
You must commit and push the updated files for the GitHub action to work. The changes should be in TinaCloud.
Once you've finished setting up the GitHub action for your own project you should be able to see a new workflow called Audit Content with AI in the GitHub Actions for your repo. Run it to perform your first content audit.

The flow will output a list of Issues after the content audit is finished. Each Issue will contain a list of suggestions for the content and a handy link to the file that needs to be changed.
lastChecked date of every file that was audited.

It's important that you merge this pull request before running the GitHub Action again. Otherwise it will audit the same files again when you re-run it.
Now that you have a set of Issues generated from the Workflow, you have a couple of options for tackling the feedback. You can do the Issues yourself or fully automate the process by assigning the Issue to GitHub Copilot!