Skip to content

Commit 6dcbd1b

Browse files
committed
Update ci.yml
1 parent 15a2f10 commit 6dcbd1b

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,41 @@ jobs:
265265
fi
266266
done
267267
shopt -u nullglob
268+
- name: generate-modules-md
269+
shell: bash
270+
run: |
271+
set -euo pipefail
272+
# Ensure the docs directory exists
273+
mkdir -p documentation/docs/modules
274+
# Ensure the documentation directory exists
275+
mkdir -p documentation/docs
276+
277+
# Generate modules.md in the docs directory
278+
echo '# List of Modules' > documentation/docs/modules.md
279+
echo "" >> documentation/docs/modules.md
280+
281+
# Check if modules.json exists and generate index
282+
if [ -f "documentation/modules.json" ]; then
283+
echo "Generating module index from modules.json..."
284+
jq -r '
285+
sort_by(.name) |
286+
.[] |
287+
@text "## [\(.name)](\(.source))\n\(.description // "No description available")\n"
288+
' documentation/modules.json >> documentation/docs/modules.md
289+
# Also generate an index.md inside docs/modules for directory-style index
290+
echo '# Modules' > documentation/docs/modules/index.md
291+
echo "" >> documentation/docs/modules/index.md
292+
jq -r '
293+
sort_by(.name) |
294+
.[] |
295+
@text "- [\(.name)](\(.source))\n"
296+
' documentation/modules.json >> documentation/docs/modules/index.md
297+
else
298+
echo "Warning: modules.json not found, creating basic index..."
299+
echo "No module data available. Please check back later." >> documentation/docs/modules.md
300+
echo "# Modules" > documentation/docs/modules/index.md
301+
echo "No module data available. Please check back later." >> documentation/docs/modules/index.md
302+
fi
268303
- name: debug-after-gather-docs
269304
run: |
270305
echo "=== AFTER GATHER MODULE DOCS ==="

0 commit comments

Comments
 (0)