docs: move public docs generation to local workflow

This commit is contained in:
beatz174-bit
2026-05-13 08:47:23 +10:00
parent 8e43118661
commit e7fd52616d
6 changed files with 78 additions and 74 deletions
+4 -11
View File
@@ -9,20 +9,13 @@ if [ "${#COMPOSE_FILES[@]}" -eq 0 ]; then
exit 1
fi
printf '%s\n' "${COMPOSE_FILES[@]}" > docs/generated/compose-files.txt
ARGS=()
for file in "${COMPOSE_FILES[@]}"; do ARGS+=("-f" "$file"); done
ENV_FILE=""
if [ -f default-environment.env ]; then
ENV_FILE="default-environment.env"
else
ENV_FILE="scripts/docs/ci-default.env"
fi
if [ ! -f "$ENV_FILE" ]; then
echo "Environment file not found: $ENV_FILE" >&2
if [ ! -x ./services-up.sh ]; then
echo "services-up.sh is missing or not executable" >&2
exit 1
fi
docker compose -p core --env-file "$ENV_FILE" --profile all "${ARGS[@]}" config > docs/generated/docker-compose.resolved.yml
./services-up.sh --profile all config > docs/generated/docker-compose.resolved.yml
service_count="$(
python3 - <<'PY'
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
cd "$ROOT"
mkdir -p docs/generated docs/diagrams docs/public
scripts/docs/generate-all.sh
if [ ! -d docs/public ] || [ -z "$(find docs/public -mindepth 1 -print -quit)" ]; then
echo "ERROR: docs/public is missing or empty after generation." >&2
exit 1
fi
echo "Public docs generated in docs/public. Review changes before commit."