Skip to content

Commit ccd370d

Browse files
committed
Doc generation now include subdirs
1 parent bab29e8 commit ccd370d

File tree

2 files changed

+48
-14
lines changed

2 files changed

+48
-14
lines changed

.github/workflows/release-docs.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
ca-certificates \
4141
fonts-liberation \
4242
libappindicator3-1 \
43-
libasound2 \
43+
libasound2-dev \
4444
libatk-bridge2.0-0 \
4545
libatk1.0-0 \
4646
libc6 \
@@ -50,7 +50,7 @@ jobs:
5050
libexpat1 \
5151
libfontconfig1 \
5252
libgbm1 \
53-
libgcc1 \
53+
libgcc-s1 \
5454
libglib2.0-0 \
5555
libgtk-3-0 \
5656
libnspr4 \
@@ -127,6 +127,7 @@ jobs:
127127
- **README.md** - Master index and usage instructions
128128
- **Main sections** - Core world information (classes, magic, equipment, etc.)
129129
- **Subsections** - Detailed pages (magic schools, specific topics)
130+
- **Entity directories** - Characters and creatures in organized subdirectories
130131
131132
## Usage
132133
@@ -138,23 +139,42 @@ jobs:
138139
## File Structure
139140
140141
\`\`\`
141-
$(ls -la *.md | awk '{print $9, "(" $5 " bytes)"}' | sort)
142+
$(find . -name "*.md" | sort | head -20)
143+
$(if [ $(find . -name "*.md" | wc -l) -gt 20 ]; then echo "... and $(($(find . -name "*.md" | wc -l) - 20)) more files"; fi)
144+
\`\`\`
145+
146+
## Directory Structure
147+
148+
\`\`\`
149+
$(find . -type d | sort)
142150
\`\`\`
143151
144152
## Total Statistics
145153
146-
- **Files:** $(ls -1 *.md | wc -l) markdown documents
154+
- **Files:** $(find . -name "*.md" | wc -l) markdown documents
155+
- **Directories:** $(find . -type d | wc -l) folders
147156
- **Size:** $(du -sh . | cut -f1) uncompressed
148-
- **Words:** ~$(cat *.md | wc -w) total words
157+
- **Words:** ~$(find . -name "*.md" -exec cat {} \; | wc -w) total words
149158
150159
For the latest version, visit: https://github.com/${{ github.repository }}/releases
151160
EOF
152161
153-
# Create the release archive
154-
zip -r "aetheria-docs-${{ github.event.inputs.version }}.zip" *.md RELEASE_INFO.md
162+
# Create the release archive with all files and subdirectories
163+
zip -r "aetheria-docs-${{ github.event.inputs.version }}.zip" . -i "*.md" "RELEASE_INFO.md"
155164
156165
echo "📦 Created release archive:"
157166
ls -lh *.zip
167+
echo ""
168+
echo "📁 Archive contents:"
169+
unzip -l "aetheria-docs-${{ github.event.inputs.version }}.zip" | head -30
170+
171+
- name: Count generated files
172+
id: count-files
173+
run: |
174+
cd site/generated-docs
175+
file_count=$(find . -name "*.md" | wc -l)
176+
echo "count=$file_count" >> $GITHUB_OUTPUT
177+
echo "Found $file_count markdown files"
158178
159179
- name: Create release
160180
uses: softprops/action-gh-release@v1

.github/workflows/test-docs.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,23 @@ jobs:
7979
run: |
8080
cd site/generated-docs
8181
82-
echo "📊 Generated files:"
83-
ls -la *.md | head -20
82+
echo "📊 Generated files and directories:"
83+
find . -name "*.md" | head -20
8484
echo ""
8585
86-
file_count=$(ls -1 *.md | wc -l)
86+
file_count=$(find . -name "*.md" | wc -l)
8787
total_size=$(du -sh . | cut -f1)
8888
8989
echo "📋 Statistics:"
9090
echo " Files: $file_count"
9191
echo " Total size: $total_size"
9292
echo ""
9393
94+
# Show directory structure
95+
echo "📁 Directory structure:"
96+
find . -type d | sort
97+
echo ""
98+
9499
# Verify required files exist
95100
required_files=("README.md" "index.md" "magic.md" "classes.md")
96101
@@ -105,15 +110,22 @@ jobs:
105110
done
106111
107112
# Check for magic school files
108-
magic_files=$(ls magic-*.md 2>/dev/null | wc -l)
113+
magic_files=$(find . -name "magic-*.md" | wc -l)
109114
echo "🔮 Magic school files: $magic_files"
110115
111116
if [ "$magic_files" -lt 5 ]; then
112117
echo "⚠️ Expected more magic school files"
113118
fi
114119
115-
# Verify file sizes are reasonable
116-
for file in *.md; do
120+
# Check for entity directories and files
121+
character_files=$(find . -path "*/characters/*.md" | wc -l)
122+
creature_files=$(find . -path "*/creatures/*.md" | wc -l)
123+
124+
echo "👥 Character files: $character_files"
125+
echo "🐉 Creature files: $creature_files"
126+
127+
# Verify file sizes are reasonable (check all markdown files)
128+
find . -name "*.md" | while read file; do
117129
size=$(stat -c%s "$file")
118130
if [ "$size" -lt 100 ]; then
119131
echo "⚠️ $file seems too small ($size bytes)"
@@ -129,5 +141,7 @@ jobs:
129141
uses: actions/upload-artifact@v4
130142
with:
131143
name: test-generated-docs
132-
path: site/generated-docs/*.md
144+
path: |
145+
site/generated-docs/**/*.md
146+
site/generated-docs/*.md
133147
retention-days: 7

0 commit comments

Comments
 (0)