The Problem with GitHub Actions Documentation
Imagine this: You have a monorepo with 15 different GitHub Actions. Each action has an action.yml file with inputs, outputs, and descriptions. Each action also needs a README with usage examples and documentation.
Every time you change an action, you must:
- Update the action.ymlfile
- Update the README.md file by hand
- Do this for all 15 actions
- Hope you don't forget any
- Hope your team members do the same
This happens when you:
- Add new inputs or outputs
- Change input names or descriptions
- Make inputs required or optional
- Update default values
- Rename the action
This is hard. This is the documentation problem that happens in GitHub Actions repositories, especially monorepos.
Why Monorepos Are Hard
Monorepos with many GitHub Actions are difficult because:
- Too many actions: 5, 10, or 20+ actions to keep updated
- Many developers: Different people work on different actions
- Same format: All documentation must look the same
- Changes happen fast: Actions change but documentation doesn't
The result? Old documentation that confuses users and wastes time.
The Solution: gh-action-readme
gh-action-readme is a GitHub CLI tool that fixes this problem. The best part? It works with monorepos.
  
  
  The --recursive Flag
The key feature is the --recursive flag. With one command:
gh action-readme update --recursive
This does everything:
- Finds all action.ymlfiles in your repository
- Updates all READMEs
- Keeps your custom content
- Works with nested folders
Example Monorepo
Here's what a typical monorepo looks like:
my-actions-monorepo/
├── docker/
│   ├── build-action/
│   │   ├── action.yml
│   │   └── README.md
│   └── push-action/
│       ├── action.yml
│       └── README.md
└── kubernetes/
    ├── deploy-action/
    │   ├── action.yml
    │   └── README.md
    └── rollback-action/
        ├── action.yml
        └── README.md
With gh-action-readme, you can manage all actions easily:
# Create READMEs for all actions
gh action-readme init --recursive
# Update all documentation
gh action-readme update --recursive
# Check if documentation is up-to-date
gh action-readme diff --recursive
How Placeholders Work
The smart part is the placeholder system. Instead of creating whole READMEs, gh-action-readme uses special HTML comments that you control:
# <!--name--><!--/name-->
<!--description-->
## Inputs
<!--inputs-->
## Outputs
<!--outputs-->
## Usage
<!--usage action="org/repo" version="v1.0.0"-->
```yaml
steps:
  - uses: org/repo@v1.0.0
    with:
      input: value
```
<!--/usage-->
This gives you the best of both:
- Auto-updated parts: Inputs, outputs, descriptions stay current
- Your content: You control everything else
- Version updates: Usage examples update automatically
Easy Workflows for Monorepos
1. Auto-update on Commit
Add this to .pre-commit-config.yaml:
repos:
  - repo: https://github.com/reakaleek/gh-action-readme
    rev: v0.5.0
    hooks:
      - id: action-readme
Now every commit updates all documentation. No more forgotten READMEs.
2. Check Documentation in CI
name: pre-commit
on:
  pull_request:
jobs:
  check-docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
      - uses: pre-commit/action@v3.0.1
This stops PRs when documentation is wrong. The pre-commit/action automatically runs your pre-commit hooks in CI.
3. Common Commands
# Create READMEs for all actions
gh action-readme init --recursive
# Update all documentation
gh action-readme update --recursive
# Check which actions need updates
gh action-readme diff --recursive
Get Started in 5 Minutes
- Install the tool:
   gh extension install reakaleek/gh-action-readme
- Create READMEs for all actions:
   gh action-readme init --recursive
- Set up auto-updates:
   # Add to .pre-commit-config.yaml
   repos:
     - repo: https://github.com/reakaleek/gh-action-readme
       rev: v0.5.0
       hooks:
         - id: action-readme
- Update all documentation:
   gh action-readme update --recursive
Done! Your monorepo documentation is now automatic.
Conclusion
The monorepo documentation problem is real. It takes time every week to keep documentation current. gh-action-readme helps fix this problem.
With monorepo support, automatic workflows, and easy setup, gh-action-readme makes documentation easier. Your team can focus on building actions while the documentation stays up-to-date.
Ready to fix your action documentation?
Get started in 5 minutes: Install gh-action-readme and make monorepo documentation easy.
 

 
    
Top comments (0)