Skip to content

Commit d720756

Browse files
committed
handle case where data_model directory is removed entirely before regenerating files
Signed-off-by: Amndeep Singh Mann <[email protected]>
1 parent 1ac88dc commit d720756

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.github/workflows/regenerate-docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
with:
1717
repository: ${{ github.event.pull_request.head.repo.full_name }}
1818
ref: ${{ github.head_ref }}
19+
- name: Clean /docs/data_model
20+
shell: bash
21+
run: rm -rfv ./docs/data_model
1922
- name: Clean /docs/analytics
2023
shell: bash
2124
run: rm -rfv ./docs/analytics

scripts/generate_datamodels.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def generate_index_with_sensors(datamodels, jinja_env):
6262
def main():
6363
datamodels = parse_yaml()
6464
replace_sensor_names_with_html(datamodels, cached_load_sensor())
65+
Path('../docs/data_model').mkdir(exist_ok=True)
6566
jinja_env = create_jinja_environment()
6667
generate_markdown(datamodels, jinja_env)
6768
generate_index(datamodels, jinja_env)

0 commit comments

Comments
 (0)