GitHub Action Integration

The NextGen documentation is still under construction.

Automate Content Quality Checks in Your GitHub Workflows!

Tired of manually reviewing content quality in your repositories? Say hello to automated content analysis that integrates seamlessly with your existing GitHub workflows!

Acrolinx NextGen GitHub Action automatically analyzes your content files during pull requests, pushes, and manual workflows, ensuring your documentation and content consistently meet your brand standards and style guidelines. This powerful integration catches content issues early in the development process, preventing low-quality content from reaching your users.

The GitHub Action intelligently adapts to different GitHub events, analyzing only the files that matter for each workflow type. Whether you’re reviewing changes in a pull request, monitoring direct commits, or running comprehensive repository analysis, the action provides detailed feedback and actionable insights to maintain high content quality standards.

This guide will show you how to set up automated content quality checks using Acrolinx NextGen capabilities directly in your GitHub repositories, ensuring consistent brand alignment and proactive content governance.


GitHub Action Use Cases

The Acrolinx NextGen GitHub Action is designed to work seamlessly with different GitHub workflows and event types:

πŸ”„ Pull Request Analysis

  • When to Use: Review content changes before merging
  • What it Does: Analyzes only files modified in the pull request
  • Benefits: Catch content issues early, ensure quality before merge
  • Perfect For: Teams that want to maintain content quality gates

πŸš€ Push Event Monitoring

  • When to Use: Monitor direct commits to branches
  • What it Does: Analyzes files changed in the push
  • Benefits: Quick feedback on direct commits, maintain quality standards
  • Perfect For: Small teams or solo developers

πŸ”§ Manual Workflow Analysis

  • When to Use: Comprehensive repository-wide content audit
  • What it Does: Analyzes all supported files in the repository
  • Benefits: Complete content health assessment, identify areas for improvement
  • Perfect For: Regular content audits, compliance checks

πŸ“Š Continuous Content Monitoring

  • When to Use: Ongoing quality assurance for content repositories
  • What it Does: Runs on schedule or manual triggers
  • Benefits: Proactive content quality management, trend analysis
  • Perfect For: Documentation teams, content-heavy projects

Prerequisites

To set up the Acrolinx NextGen GitHub Action, you’ll need:

  • A GitHub repository with content files you want to analyze
  • A valid Acrolinx NextGen API Key. Don’t have one yet? Join the waitlist, and we’ll email you once your access is approved.
  • GitHub Actions enabled in your repository
  • Content files in supported formats (Markdown, Text)
  • GitHub repository secrets configured for secure API key storage

Supported File Types

The GitHub Action automatically detects and analyzes the following file types:

  • Markdown: .md, .markdown
  • Text: .txt

The action intelligently filters files based on their extensions, ensuring only relevant content is analyzed.


Quick Start Guide

1. Add the Action to Your Repository

Create a .github/workflows/acrolinx-analysis.yml file in your repository:

1name: Acrolinx Content Analysis
2
3on:
4 pull_request:
5 paths:
6 - '**.md'
7 - '**.txt'
8 push:
9 branches: [main, develop]
10 paths:
11 - '**.md'
12 - '**.txt'
13 workflow_dispatch:
14
15jobs:
16 analyze-content:
17 runs-on: ubuntu-latest
18 steps:
19 - name: Checkout code
20 uses: actions/checkout@v4
21
22 - name: Run Acrolinx Analysis
23 uses: acrolinx/nextgen-analyzer@v0.0.5
24 with:
25 acrolinx_token: ${{ secrets.ACROLINX_API_TOKEN }}
26 dialect: american_english
27 tone: formal
28 style-guide: microsoft
29 github_token: ${{ secrets.GITHUB_TOKEN }}

2. Configure Repository Secrets

  1. Go to your repository’s Settings β†’ Secrets and variables β†’ Actions
  2. Add a new repository secret:
    • Name: ACROLINX_API_TOKEN
    • Value: Your Acrolinx NextGen API key

3. Customize Analysis Settings

The action supports various configuration options:

1- name: Run Acrolinx Analysis
2 uses: acrolinx/nextgen-analyzer@v0.0.5
3 with:
4 acrolinx_token: ${{ secrets.ACROLINX_API_TOKEN }}
5 dialect: british_english # american_english, british_english
6 tone: informal # formal, informal, academic
7 style-guide: ap # microsoft, ap, chicago
8 github_token: ${{ secrets.GITHUB_TOKEN }}
9 add_commit_status: true # true, false

Advanced Configuration

Event-Specific Workflows

Pull Request Analysis

1name: PR Content Review
2
3on:
4 pull_request:
5 paths:
6 - 'docs/**'
7 - 'README.md'
8 - 'CHANGELOG.md'
9
10jobs:
11 content-review:
12 runs-on: ubuntu-latest
13 steps:
14 - uses: actions/checkout@v4
15
16 - name: Analyze PR Content
17 uses: acrolinx/nextgen-analyzer@v0.0.5
18 with:
19 acrolinx_token: ${{ secrets.ACROLINX_API_TOKEN }}
20 dialect: american_english
21 tone: formal
22 style-guide: microsoft
23 github_token: ${{ secrets.GITHUB_TOKEN }}

Push Event Monitoring

1name: Content Quality Check
2
3on:
4 push:
5 branches: [main]
6 paths:
7 - '**.md'
8 - '**.txt'
9
10jobs:
11 quality-check:
12 runs-on: ubuntu-latest
13 steps:
14 - uses: actions/checkout@v4
15
16 - name: Check Content Quality
17 uses: acrolinx/nextgen-analyzer@v0.0.5
18 with:
19 acrolinx_token: ${{ secrets.ACROLINX_API_TOKEN }}
20 dialect: american_english
21 tone: formal
22 style-guide: microsoft
23 github_token: ${{ secrets.GITHUB_TOKEN }}

Manual Repository Analysis

1name: Full Content Audit
2
3on:
4 workflow_dispatch:
5 schedule:
6 - cron: '0 0 * * 1' # Every Monday at midnight
7
8jobs:
9 content-audit:
10 runs-on: ubuntu-latest
11 steps:
12 - uses: actions/checkout@v4
13
14 - name: Full Repository Analysis
15 uses: acrolinx/nextgen-analyzer@v0.0.5
16 with:
17 acrolinx_token: ${{ secrets.ACROLINX_API_TOKEN }}
18 dialect: american_english
19 tone: formal
20 style-guide: microsoft
21 github_token: ${{ secrets.GITHUB_TOKEN }}

Action Outputs

The GitHub Action provides detailed outputs that you can use in subsequent workflow steps:

Available Outputs

  • event-type: The type of GitHub event that triggered the action (push, pull_request, workflow_dispatch)
  • files-analyzed: Number of files that were analyzed
  • acrolinx-results: JSON string containing detailed analysis results

Using Outputs in Workflows

1- name: Run Acrolinx Analysis
2 id: acrolinx
3 uses: acrolinx/nextgen-analyzer@v0.0.5
4 with:
5 acrolinx_token: ${{ secrets.ACROLINX_API_TOKEN }}
6 dialect: american_english
7 tone: formal
8 style-guide: microsoft
9 github_token: ${{ secrets.GITHUB_TOKEN }}
10
11- name: Process Results
12 run: |
13 echo "Event type: ${{ steps.acrolinx.outputs.event-type }}"
14 echo "Files analyzed: ${{ steps.acrolinx.outputs.files-analyzed }}"
15 echo "Results: ${{ steps.acrolinx.outputs.acrolinx-results }}"

Pull Request Integration

Automatic PR Comments

When the action runs on pull requests, it automatically:

  1. Analyzes changed files in the pull request
  2. Creates or updates comments with detailed analysis results
  3. Provides actionable feedback for content improvements
  4. Shows quality scores for each analyzed file

PR Comment Features

  • πŸ“Š Quality Score Summary: Overall content quality assessment
  • 🎯 Issue Details: Specific problems found with suggestions
  • πŸ“ˆ Score Breakdown: Detailed scores for quality, clarity, grammar, style, tone, and terminology
  • πŸ”§ Improvement Suggestions: Actionable recommendations for content enhancement

Example PR Comment

πŸ” Acrolinx Analysis Results

This summary was automatically generated by the Acrolinx Analyzer GitHub Action for pull_request event.

FileQualityClarityGrammarStyle GuideToneTerminology
README.mdπŸ”΄ 491468226774
markdown/acrolinx_platform_features.md🟑 650100367846
markdown/acrolinx_use_cases.md🟒 90010010062100
text/acrolinx_customers.txt🟒 802410010078100

πŸ“Š Summary

Overall Quality Score: 🟑 71

MetricAverage Score
Quality71
Clarity10
Grammar92
Style Guide65
Tone72
Terminology80

Files Analyzed: 4

Analysis performed on 7/24/2025, 11:30:11 AM Quality Score Legend: 🟒 80+ | 🟑 60-79 | πŸ”΄ 0-59 Configuration: Dialect: american_english | Tone: formal | Style Guide: microsoft Event: for workflow_dispatch event

Commit Status Integration

The action can optionally update commit status to provide quick feedback:

Status Indicators

  • βœ… Success: All analyzed files meet quality thresholds
  • ⚠️ Warning: Some issues found but within acceptable limits
  • ❌ Failure: Critical issues that need immediate attention

Configuration

1- name: Run Acrolinx Analysis
2 uses: acrolinx/nextgen-analyzer@v0.0.5
3 with:
4 acrolinx_token: ${{ secrets.ACROLINX_API_TOKEN }}
5 dialect: american_english
6 tone: formal
7 style-guide: microsoft
8 github_token: ${{ secrets.GITHUB_TOKEN }}
9 add_commit_status: true # Enable commit status updates

Troubleshooting

Common Issues

Action Not Triggering

  • Check file paths: Ensure your workflow includes the correct file patterns
  • Verify event triggers: Confirm the workflow is set to run on the desired events
  • Check branch filters: Make sure the workflow runs on your target branches

API Token Issues

  • Invalid token: Verify your Acrolinx API token is correct and active
  • Token permissions: Ensure the token has the necessary permissions for content analysis
  • Secret configuration: Check that the secret is properly configured in repository settings

No Files Analyzed

  • File type support: Verify files have supported extensions (.md, .txt)
  • File content: Ensure files contain actual text content
  • File size: Check that files are not empty or too large

Analysis Failures

  • Content format: Ensure content is in a readable text format
  • API limits: Check if you’ve exceeded API rate limits
  • Network issues: Verify GitHub Actions can reach Acrolinx services

Best Practices

Workflow Design

  1. Target Specific Paths: Use path filters to run analysis only on content directories
  2. Event-Specific Workflows: Create different workflows for different use cases
  3. Quality Gates: Use the action as a quality gate in pull request workflows
  4. Scheduled Audits: Run regular repository-wide analysis for ongoing quality monitoring

Configuration Management

  1. Environment Variables: Use repository secrets for sensitive configuration
  2. Consistent Settings: Maintain consistent analysis settings across workflows
  3. Version Pinning: Pin to specific action versions for stability
  4. Documentation: Document your analysis configuration and quality standards

Team Integration

  1. Quality Standards: Establish clear quality thresholds and expectations
  2. Feedback Loop: Use PR comments to provide constructive feedback
  3. Training: Help team members understand and act on analysis results
  4. Continuous Improvement: Regularly review and adjust quality standards

Expected Outcomes

Once properly configured, the Acrolinx NextGen GitHub Action will:

  • Automatically analyze content on every relevant GitHub event
  • Provide detailed feedback through PR comments and commit status
  • Maintain consistent quality across your content repository
  • Reduce manual review effort while improving content standards
  • Enable proactive content governance with early issue detection

The action transforms your GitHub workflow into a comprehensive content quality management system, ensuring your documentation and content consistently meet your brand standards and style guidelines.


Working Example

To see the Acrolinx NextGen GitHub Action in action, check out our test repository. This repository demonstrates:

  • Real-world implementation of the GitHub Action
  • Sample workflows for different use cases
  • Example content files with various quality issues
  • PR comments and commit status examples
  • Configuration variations for different scenarios

What You’ll Find in the Test Repository

  • .github/workflows/: Complete workflow configurations
  • docs/: Sample documentation files for testing
  • README.md: Repository setup and usage instructions
  • Pull Request examples: Real PR comments and analysis results
  • Configuration examples: Different analysis settings and use cases

Visit github.com/acrolinx/github-action-testdata to explore the working example and see how the action performs in a real repository environment.