Skip to content

Commit 06f911d

Browse files
wd60622GitHub Actionsjuanitorduz
authored andcommitted
Automate UML creation (#886)
* attempt to automate uml * install graphviz binaries * use sudo * Update UML Diagrams * remove the git configuration * use the identity of the previous commit * dont push with no change * same triggers as others * restrict to running with repo_changes --------- Co-authored-by: GitHub Actions <[email protected]> Co-authored-by: Juan Orduz <[email protected]>
1 parent ae144a3 commit 06f911d

File tree

5 files changed

+44
-0
lines changed

5 files changed

+44
-0
lines changed

.github/workflows/uml.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Update the UML Diagrams
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
paths:
7+
- "pymc_marketing/**"
8+
push:
9+
branches: [main]
10+
paths:
11+
- "pymc_marketing/**"
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: "3.10"
25+
26+
- name: Configure Git Identity
27+
run: |
28+
git config user.name "$(git log -n 1 --pretty=format:%an)"
29+
git config user.email "$(git log -n 1 --pretty=format:%ae)"
30+
31+
- name: Update the UML Diagrams
32+
run: |
33+
sudo apt-get update && sudo apt-get install -y graphviz
34+
make uml
35+
36+
- name: Push up the changes
37+
run: |
38+
git add docs/source/uml/*.png
39+
if git diff --staged --exit-code; then
40+
echo "No changes to commit"
41+
else
42+
git commit -m "Update UML Diagrams"
43+
git push
44+
fi

docs/source/uml/classes_clv.png

31.6 KB
Loading

docs/source/uml/classes_mmm.png

-14.3 KB
Loading

docs/source/uml/packages_clv.png

-480 Bytes
Loading

docs/source/uml/packages_mmm.png

33.3 KB
Loading

0 commit comments

Comments
 (0)