GitHub Action Integration
Automate PROJECT_STRUCTURE.md generation in GitHub Actions CI/CD workflows.
3 min read•Updated July 22, 2026
The @repoatlasdev/github-action allows you to automatically generate and maintain PROJECT_STRUCTURE.md and MERMAID.md files in your GitHub repository.
Quick Start
Add this workflow to your repository at .github/workflows/structure.yml:
yaml
1name: Generate Repository Structure
2on:
3 push:
4 branches: [ main ]
5
6jobs:
7 structure:
8 runs-on: ubuntu-latest
9 steps:
10 - uses: actions/checkout@v4
11 - uses: akshaykumar33/RepoAtlas@main
12 with:
13 auto_commit: true
14 generate_mermaid: true
15 output_file: 'PROJECT_STRUCTURE.md'Action Inputs
| Input | Required | Default | Description |
|---|---|---|---|
target_dir | No | . | Directory to scan |
output_file | No | PROJECT_STRUCTURE.md | Output file path |
theme | No | unicode | Rendering theme |
icons | No | emoji | Icon pack |
max_depth | No | 10 | Max recursion depth |
generate_mermaid | No | false | Also generate Mermaid diagram |
auto_commit | No | false | Auto-commit generated files |
commit_message | No | docs: update project structure | Commit message |
Advanced: Multiple Output Formats
yaml
1- uses: akshaykumar33/RepoAtlas@main
2 with:
3 theme: 'material'
4 icons: 'vscode'
5 max_depth: '6'
6 output_file: 'docs/STRUCTURE.md'
7 generate_mermaid: 'true'
8 auto_commit: 'true'
9 commit_message: 'docs(ci): auto-update project structure'Permissions
The action requires write permissions to commit files. Add this to your workflow:
yaml
permissions:
contents: write