[WIP] fix ump git push #3
This file contains 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: Update the UML Diagrams | |
on: | |
pull_request: | |
branches: [main] | |
# paths: | |
# - "pymc_marketing/**" | |
push: | |
branches: [main] | |
# paths: | |
# - "pymc_marketing/**" | |
pull_request_target: | |
branches: [main] | |
# paths: | |
# - "pymc_marketing/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# with: | |
# ref: ${{ github.event.pull_request.head.ref }} | |
- 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 | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: "Update UML Diagrams" | |
add: "docs/source/uml/*.png" | |
branch: ${{ github.ref }} | |
default_author: github_actions | |
# 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 $GITHUB_REF | |
# fi |