feat: central/shared kubernetes platform landing zone and optional namespace creation in app landing zone #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate Architecture Diagrams | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - "src/**" | |
| - "modules/**" | |
| - "assets/**" | |
| - "docs/scripts/generate_example_architecture.py" | |
| - "docs/diagram-generation.md" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "src/**" | |
| - "modules/**" | |
| - "assets/**" | |
| - "docs/scripts/generate_example_architecture.py" | |
| - "docs/diagram-generation.md" | |
| permissions: | |
| contents: write | |
| jobs: | |
| generate-diagrams: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install Mermaid CLI | |
| run: npm install -g @mermaid-js/mermaid-cli | |
| - name: Generate architecture diagrams | |
| run: python3 docs/scripts/generate_example_architecture.py --out-dir docs/diagrams | |
| - name: Render Mermaid SVG diagrams | |
| run: | | |
| for diagram in docs/diagrams/*.mmd; do | |
| output="${diagram%.mmd}.svg" | |
| mmdc -i "$diagram" -o "$output" -c .github/mermaid-config.json -p .github/mermaid-puppeteer-config.json | |
| done | |
| - name: Verify generated diagrams are committed (PR) | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| if [[ -n "$(git status --porcelain -- docs/diagrams)" ]]; then | |
| echo "::error::Generated diagrams are out of date. Run the generator locally and commit the changes." | |
| git status --short -- docs/diagrams | |
| exit 1 | |
| fi | |
| - name: Commit updated diagrams (main) | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.actor != 'github-actions[bot]' | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "chore(diagrams): regenerate architecture diagrams" | |
| file_pattern: docs/diagrams/*.mmd docs/diagrams/*.mmd.md docs/diagrams/*.svg |