diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c6817c8b..6e591f92 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -61,10 +61,11 @@ jobs: - name: Run markdown-code-runner on docs run: | + set -e for f in docs/*.md docs/**/*.md; do if [ -f "$f" ]; then echo "Processing $f..." - markdown-code-runner "$f" || echo "Warning: Failed to process $f" + markdown-code-runner "$f" fi done diff --git a/custom_components/adaptive_lighting/_docs_helpers.py b/custom_components/adaptive_lighting/_docs_helpers.py index 0c4ed45d..8611efa8 100644 --- a/custom_components/adaptive_lighting/_docs_helpers.py +++ b/custom_components/adaptive_lighting/_docs_helpers.py @@ -5,14 +5,24 @@ import pandas as pd import voluptuous as vol from homeassistant.helpers import selector -from .const import ( - DOCS, - DOCS_APPLY, - DOCS_MANUAL_CONTROL, - SET_MANUAL_CONTROL_SCHEMA, - VALIDATION_TUPLES, - apply_service_schema, -) +try: + from .const import ( + DOCS, + DOCS_APPLY, + DOCS_MANUAL_CONTROL, + SET_MANUAL_CONTROL_SCHEMA, + VALIDATION_TUPLES, + apply_service_schema, + ) +except ImportError: + from const import ( + DOCS, + DOCS_APPLY, + DOCS_MANUAL_CONTROL, + SET_MANUAL_CONTROL_SCHEMA, + VALIDATION_TUPLES, + apply_service_schema, + ) def _format_voluptuous_instance(instance: vol.All) -> str: