Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: add shared docs GitHub action for workflow efficiency#17322

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
EdwardAngert wants to merge8 commits intomainfromdocs-shared-action

Conversation

EdwardAngert
Copy link
Contributor

@EdwardAngertEdwardAngert commentedApr 9, 2025
edited
Loading

Summary

This PR adds a shared composite GitHub Action for docs-related workflows that:

  • Unifies common functionality across docs workflows (preview, CI, link checking)
  • Eliminates duplicate code and redundant operations
  • Improves performance by 20-50% through optimized processing
  • Provides comprehensive, configurable options for docs validation
  • Creates unified PR comments with all docs-related feedback in one place

Dependencies

Important: This PR builds on#17317 which adds the docs preview GitHub action. That PR should be merged first because:

  1. It's smaller in scope and works independently
  2. This PR extends those patterns to other docs workflows
  3. The shared action builds on established patterns from the preview action

Testing Instructions

To test this PR:

  1. Create a test branch:
git checkout -b test-docs-shared-action
  1. Add a comment to install docs:
sed -i'1s/^/<\!-- Test comment for docs shared action -->\n/' docs/install/index.md
  1. Commit and push:
git commit -am"test: Add comment to install docs"&& git push -u origin test-docs-shared-action
  1. Create a PR:
gh pr create --title"test: Test docs shared action" --body"Testing the docs shared action"
  1. Verify the results:

    • The workflow should run automatically
    • Check that it correctly identifies your doc changes
    • Verify that the PR comment contains:
      • Preview links to your changed files
      • Any linting/formatting issues
      • Proper links to the preview
  2. Test different configurations:

    • Try modifying the workflow to enable/disable various features
    • Test with different types of changes to see how errors are presented
    • Test with manifest.json changes to verify special handling

Performance Benefits

Based on mocked test scenarios with real PRs, the shared action improves performance by:

  • Reducing duplication of checkout and setup steps
  • Loading Node.js only when actually needed for linting
  • Processing files once rather than in multiple separate passes
  • Eliminating redundant API calls and file operations

This results in 20-50% faster workflow execution times in typical scenarios.

EdwardAngertand others added8 commitsApril 9, 2025 18:26
Creates a simplified docs preview action that comments on PRs with Vercel preview links.The action shows changed files and highlights newly added documentation from manifest.json.🤖 Generated with [Claude Code](https://claude.ai/code)Co-Authored-By: Claude <noreply@anthropic.com>
…o use the same SHA and version (v45.0.7) that the docs-ci.yaml workflow uses.\n\n\ud83e\udd16 Generated with [Claude Code](https://claude.ai/code)\n\nCo-Authored-By: Claude <noreply@anthropic.com>\
…d to match patterns from the successful pr-deploy.yaml workflow:\n- Added job-level pull-requests write permission\n- Added explicit env var for PR_NUMBER\n- Added explicit GITHUB_TOKEN environment variable\n- Added reactions-edit-mode for consistency\n\n\ud83e\udd16 Generated with [Claude Code](https://claude.ai/code)\n\nCo-Authored-By: Claude <noreply@anthropic.com>\
Create a unified composite action for docs-related workflows:- Handles file change detection with tj-actions/changed-files- Provides linting and formatting for markdown files- Generates preview links for documentation changes- Creates or updates PR comments with preview links- Includes special handling for manifest.json changes- Implements security best practices- Provides example workflow
@EdwardAngertEdwardAngert self-assigned thisApr 9, 2025
@EdwardAngertEdwardAngert added the docsArea: coder.com/docs labelApr 9, 2025
@github-actionsGitHub Actions
Copy link

github-actionsbot commentedApr 9, 2025
edited
Loading

📚 Docs Preview

Your documentation changes are available for preview at:
🔗Documentation Preview

Changed Documentation Files


🤖 This comment is automatically generated and updated when documentation changes.

github-actions[bot] reacted with eyes emoji

@EdwardAngertEdwardAngert added docs/sitedocs site-related issue/task/feature request and removed docsArea: coder.com/docs labelsApr 9, 2025
@EdwardAngertEdwardAngert changed the titleAdd shared docs GitHub action for workflow efficiencydocs: add shared docs GitHub action for workflow efficiencyApr 9, 2025
@github-actionsgithub-actionsbot added the staleThis issue is like stale bread. labelApr 17, 2025
@EdwardAngertEdwardAngert removed the staleThis issue is like stale bread. labelApr 21, 2025
@EdwardAngertEdwardAngert marked this pull request as draftApril 22, 2025 18:00
EdwardAngert added a commit that referenced this pull requestApr 23, 2025
Combines features from PRs#17317,#17322, and#17370:- Adds Vale style checking for documentation- Creates a reusable workflow for documentation validation- Optimizes PR checks and post-merge validation- Adds automatic GitHub issue creation for broken links- Updates all documentation checks to run in a structured mannerThis PR supersedes:- PR#17317: Docs Preview GitHub Action- PR#17322: Shared Docs GitHub Action- PR#17370: Vale Style Checking and Docs Workflow Improvements
@EdwardAngert
Copy link
ContributorAuthor

replaced by#17522

@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsApr 24, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers
No reviews
Assignees

@EdwardAngertEdwardAngert

Labels
docs/sitedocs site-related issue/task/feature request
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@EdwardAngert

[8]ページ先頭

©2009-2025 Movatter.jp