@@ -72,10 +72,12 @@ jobs:
7272 if [ -d "./build/site" ]; then
7373 echo "✅ Site generated successfully"
7474 ls -la ./build/site
75- # Check if PDF was generated and would be available for UI bundle
76- if [ -f "./build/assembler/microprofile-tutorial/6.1/microprofile-tutorial.pdf" ]; then
77- echo "✅ PDF generated successfully for UI bundle"
78- ls -la ./build/assembler/microprofile-tutorial/6.1/
75+ # Check if PDF was generated (it's actually generated as index.pdf in _exports)
76+ echo "🔍 Looking for generated PDF files..."
77+ find . -name "*.pdf" -type f
78+
79+ if [ -f "./build/assembler/microprofile-tutorial/6.1/_exports/index.pdf" ] || [ -f "./build/site/microprofile-tutorial/6.1/_exports/index.pdf" ]; then
80+ echo "✅ PDF generated successfully (found as index.pdf in _exports)"
7981 else
8082 echo "⚠️ PDF not generated in expected location"
8183 find . -name "*.pdf" -type f
@@ -176,17 +178,33 @@ jobs:
176178 # Verify PDF generation and copy to correct location for download
177179 - name : Verify PDF generation and copy to correct location for download
178180 run : |
179- if [ -f "./build/assembler/microprofile-tutorial/6.1/microprofile-tutorial.pdf" ]; then
180- echo "✅ PDF generated in assembler location"
181- PDF_SIZE=$(stat -f%z "./build/assembler/microprofile-tutorial/6.1/microprofile-tutorial.pdf" 2>/dev/null || stat -c%s "./build/assembler/microprofile-tutorial/6.1/microprofile-tutorial.pdf")
181+ echo "🔍 Looking for generated PDF files..."
182+ find . -name "*.pdf" -type f
183+
184+ # The PDF is actually generated as index.pdf in _exports subdirectory
185+ PDF_SOURCE=""
186+ if [ -f "./build/assembler/microprofile-tutorial/6.1/_exports/index.pdf" ]; then
187+ PDF_SOURCE="./build/assembler/microprofile-tutorial/6.1/_exports/index.pdf"
188+ echo "✅ PDF found in assembler/_exports location"
189+ elif [ -f "./build/site/microprofile-tutorial/6.1/_exports/index.pdf" ]; then
190+ PDF_SOURCE="./build/site/microprofile-tutorial/6.1/_exports/index.pdf"
191+ echo "✅ PDF found in site/_exports location"
192+ else
193+ echo "❌ PDF not found in expected locations"
194+ echo "Available PDF files:"
195+ find . -name "*.pdf" -type f
196+ exit 1
197+ fi
198+
199+ if [ -n "$PDF_SOURCE" ]; then
200+ PDF_SIZE=$(stat -f%z "$PDF_SOURCE" 2>/dev/null || stat -c%s "$PDF_SOURCE")
182201 echo "PDF Size: ${PDF_SIZE} bytes"
183202
184203 # Copy PDF to the exact location the download link expects
185204 # The download link is ../../microprofile-tutorial/6.1/microprofile-tutorial.pdf
186205 # From /microprofile-tutorial/6.1/index.html, this resolves to /microprofile-tutorial/6.1/microprofile-tutorial.pdf
187206 mkdir -p "./build/site/microprofile-tutorial/6.1/"
188- cp "./build/assembler/microprofile-tutorial/6.1/microprofile-tutorial.pdf" \
189- "./build/site/microprofile-tutorial/6.1/microprofile-tutorial.pdf"
207+ cp "$PDF_SOURCE" "./build/site/microprofile-tutorial/6.1/microprofile-tutorial.pdf"
190208 echo "✅ PDF copied to download location: /microprofile-tutorial/6.1/microprofile-tutorial.pdf"
191209
192210 # Verify the copy was successful
@@ -216,10 +234,6 @@ jobs:
216234 echo "✅ PDF-specific .htaccess created"
217235
218236 echo "✅ PDF download headers configured"
219- else
220- echo "❌ PDF not found in assembler location"
221- find . -name "*.pdf" -type f
222- exit 1
223237 fi
224238
225239 # Copy assembler directory to site for PDF access via UI bundle
0 commit comments