Skip to content

Commit

Permalink
handle case where data_model directory is removed entirely before reg…
Browse files Browse the repository at this point in the history
…enerating files

Signed-off-by: Amndeep Singh Mann <amann@mitre.org>
  • Loading branch information
Amndeep7 committed Feb 27, 2023
1 parent 1ac88dc commit d720756
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/regenerate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Clean /docs/data_model
shell: bash
run: rm -rfv ./docs/data_model
- name: Clean /docs/analytics
shell: bash
run: rm -rfv ./docs/analytics
Expand Down
1 change: 1 addition & 0 deletions scripts/generate_datamodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def generate_index_with_sensors(datamodels, jinja_env):
def main():
datamodels = parse_yaml()
replace_sensor_names_with_html(datamodels, cached_load_sensor())
Path('../docs/data_model').mkdir(exist_ok=True)
jinja_env = create_jinja_environment()
generate_markdown(datamodels, jinja_env)
generate_index(datamodels, jinja_env)
Expand Down

1 comment on commit d720756

@wzy19830823
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts/generate_datamodels.py

Please sign in to comment.