-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Create workflow to auto-add SEO descriptions #23952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This workflow automatically adds SEO descriptions to modified markdown files in the 'docs/en/' directory when a pull request is merged. It checks for existing descriptions, generates new ones using OpenAI, and commits the updates in a new branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a GitHub Actions workflow that automatically generates and adds SEO descriptions to documentation files when pull requests are merged. The workflow uses OpenAI's API to create concise meta descriptions for improved search engine visibility.
Key changes:
- Creates an automated workflow triggered on PR merges to specific branches
- Implements Python script for SEO description generation using OpenAI API
- Establishes branch creation and pull request automation for SEO updates
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Moved the SEO description generation logic from an inline script in the GitHub Actions workflow to a dedicated Python script at .github/scripts/add_seo_descriptions.py. Updated the workflow to call this script directly, improving maintainability and readability.
Enhanced the detection and updating of SEO description blocks in add_seo_descriptions.py. The script now checks for the presence and non-emptiness of the Description field, and updates or inserts the SEO block as needed, handling invalid JSON gracefully.
Co-authored-by: Copilot <[email protected]>
This workflow automatically adds SEO descriptions to modified markdown files in the 'docs/en/' directory when a pull request is merged. It checks for existing descriptions, generates new ones using OpenAI, and commits the updates in a new branch.