forked from pymc-labs/pymc-marketing
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.24 KB
/
uml.yml
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
45
46
47
48
49
name: Update the UML Diagrams
on:
pull_request:
# branches: [main]
# paths:
# - "pymc_marketing/**"
push:
# branches: [main]
# paths:
# - "pymc_marketing/**"
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || 'main' }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Configure Git Identity
run: |
git config user.name "$(git log -n 1 --pretty=format:%an)"
git config user.email "$(git log -n 1 --pretty=format:%ae)"
- name: Update the UML Diagrams
run: |
sudo apt-get update && sudo apt-get install -y graphviz
make uml
- name: Push up the changes
run: |
git add docs/source/uml/*.png
if git diff --staged --exit-code; then
echo "No changes to commit"
else
echo "Committing the changes"
git commit -m "Update UML Diagrams"
git push origin HEAD:${GITHUB_HEAD_REF:-main}
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}