Spaces:
Running
Running
| # ============================================================================= | |
| # WORKFLOW: Generate Repo Structure - [Generate Repo Structure] | |
| # PART OF: Codey - No Mercy EDITION | |
| # ============================================================================= | |
| # Role: Automated Audit & Compliance (ESOL v1.1) | |
| # Copyright: (c) 2026 VolkanSah | |
| # License: Apache 2.0 + ESOL v1.1 (https://github.com/VolkanSah/ESOL) | |
| # Enforcement: Jurisdiction Berlin, Germany (StGB & DSGVO) | |
| # ============================================================================= | |
| # Name of the workflow used to visualize the file hierarchy | |
| name: Generate Repo Structure | |
| # Trigger: Manual execution only (allows the dev to choose when to update the map) | |
| on: | |
| workflow_dispatch: | |
| # Permissions: Granting write access so the bot can save the generated Markdown | |
| permissions: | |
| contents: write | |
| jobs: | |
| # Job to analyze and map the directory tree | |
| structure: | |
| # Running on the latest stable Ubuntu environment | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Pull the latest code using a custom token | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GIT_TOKEN }} | |
| # Step 2: Prepare Python for the generator script | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| # Step 3: Run the custom logic that scans directories and creates PROJECT_STRUCTURE.md | |
| - name: Generate structure | |
| run: python .codey/scripts/generate_structure.py | |
| # Step 4: Finalize by pushing the new "Map" to the repository root | |
| - name: Commit structure | |
| run: | | |
| # Identity setup for the automated commit | |
| git config user.name "Codey Bot" | |
| git config user.email "codey@bot" | |
| # Stage the specific file generated by the script | |
| git add PROJECT_STRUCTURE.md | |
| # Check for changes to prevent empty commits; [skip ci] avoids re-triggering workflows | |
| git diff --staged --quiet || git commit -m "📁 update project structure [skip ci]" | |
| # Push the updated structure map back to the origin | |
| git push | |