Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Merge pull request #960 from Veda-Gogineni/884_delete_keyword #327

Merge pull request #960 from Veda-Gogineni/884_delete_keyword

Merge pull request #960 from Veda-Gogineni/884_delete_keyword #327

name: Generate Models Graph
on:
push:
branches:
- main
paths:
- 'app/modules/**/models.py'
- 'scripts/docs/generate_models_graph.py'
pull_request:
paths:
- 'scripts/docs/generate_models_graph.py'
jobs:
generate-models-graph:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
app-context: ["codex", "mws"]
env:
HOUSTON_APP_CONTEXT: ${{ matrix.app-context }}
FLASK_ENV: development
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT_TOKEN }}
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install -r app/requirements.txt
pip install -e .
pip install pydot
sudo apt-get install -y graphviz
- name: Generate models graph
run: ./scripts/docs/generate_models_graph.py
- name: Commit and push to docs
if: github.ref == 'refs/heads/main'
run: |
bash -xe <<EOF
if ! git diff --quiet
then
git add docs/${HOUSTON_APP_CONTEXT}-models-graph.png
git config user.name github-actions
git config user.email [email protected]
git commit -am 'Update docs/models-graph.png'
git push origin HEAD
else
echo nothing to commit
fi
EOF