Skip to content

Commit 3809c08

Browse files
committed
chore: enhance documentation generation workflow by injecting front matter and verifying HTML output
- Added a step to inject front matter into markdown files that are missing it, ensuring proper Jekyll processing. - Included a verification step to check for generated HTML files in the features directory, improving build validation. - Updated logging for better visibility during the documentation generation process.
1 parent a18c48e commit 3809c08

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/test-docs-generation.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ jobs:
7979
sed -i 's/\.md/\.html/g' "$file"
8080
done
8181
82+
# Inject front matter into all markdown files that are missing it
83+
find site-src -name "*.md" | while read file; do
84+
if ! grep -q "^---" "$file"; then
85+
echo "Injecting front matter into $file"
86+
sed -i '1s/^/---\nlayout: default\n---\n\n/' "$file"
87+
fi
88+
done
89+
8290
# Create Gemfile with exact dependencies
8391
cat > site-src/Gemfile << EOF
8492
source 'https://rubygems.org'
@@ -138,6 +146,10 @@ jobs:
138146
bundle exec jekyll build --destination ../_site
139147
cd ..
140148
149+
# Verify HTML files were generated for features
150+
echo "Checking for built HTML pages:"
151+
find _site/features -name "*.html" | head -n 10
152+
141153
# Display final build structure for debugging
142154
echo "Final site structure:"
143155
find _site -type f | grep -v ".git" | grep -e "index.html" -e "assets" -e "schema" | head -n 10

0 commit comments

Comments
 (0)