This repository was archived by the owner on Aug 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.47 KB
/
dependency-graph.yml
File metadata and controls
44 lines (35 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: "Generate Dependency Graph"
on:
push:
permissions: write-all
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: oven-sh/setup-bun@v2
- name: Install dependency-cruiser and graphviz
run: |
bun add dependency-cruiser
sudo apt-get install -y graphviz
- name: Generate Mermaid Dependency Graph
run: |
bun run dependency-cruiser --output-type mermaid src/index.ts --output-to dependency-graph.mmd --no-config -x node_modules --ts-pre-compilation-deps --ts-config tsconfig.json
echo "Mermaid graph generated at dependency-graph.mmd"
- name: Convert to ELK Layout
run: |
bash ./.github/scripts/dep-graph.sh
- name: Generate Dependency Graph (SVG)
run: |
bun run dependency-cruiser --output-type dot src/index.ts --output-to dependency-graph.dot --no-config -x node_modules --ts-pre-compilation-deps --ts-config tsconfig.json
dot -T svg -Gsplines=ortho dependency-graph.dot -o dependency-graph.svg
echo "SVG graph generated at dependency-graph.svg"
- name: Commit and Push Changes
uses: EndBug/add-and-commit@v9
with:
add: '["dependency-graph.svg", "dependency-graph.mmd"]'
message: "Update dependency graphs"
committer_name: "GitHub Action"
committer_email: "action@github.com"