Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 10, 2025

🎯 Objective

Optimize documentation publishing by moving PDF generation to dedicated virtual machines and unifying the documentation publishing process as requested in #59.

📋 Issue Reference

Fixes #59

🚀 Implementation

1. PDF Generation Optimization

  • Dedicated VM: Moved PDF generation to self-hosted runners with pdf-generation label
  • Performance Improvement: Heavy LaTeX processing no longer blocks other CI jobs
  • Artifact-based Workflow: PDF generated once and reused by documentation publisher

2. Unified Documentation Publishing

  • Single Landing Page: Created unified index with navigation for both API docs and PDF
  • Graceful Fallback: Documentation publishes successfully even if PDF generation fails
  • Improved UX: Users get one entry point for all documentation types

3. Script Unification

  • Local Script: Added .scripts/publish-unified-docs.sh for unified documentation publishing
  • React-deep-tree Integration: Incorporated patterns from react-deep-tree publishing approach
  • Maintainable: Script is versioned with the repository for easier updates

🔄 Workflow Changes

Before:

generatePdfWithCode:
  runs-on: ubuntu-latest  # Slow LaTeX processing blocks CI
  
publishDocumentation:  
  runs-on: ubuntu-latest
  needs: [findChangedCsFiles]  # Independent jobs

After:

generatePdfWithCode:
  runs-on: [self-hosted, pdf-generation]  # Dedicated fast VM
  # Uploads PDF as artifact
  
publishDocumentation:
  runs-on: ubuntu-latest  
  needs: [findChangedCsFiles, generatePdfWithCode]  # Uses PDF artifact
  # Downloads PDF and creates unified docs

📁 Files Changed

  • .github/workflows/csharp.yml: Updated workflow to use dedicated VM and artifacts
  • .scripts/publish-unified-docs.sh: New unified documentation publishing script

🖥️ Self-Hosted Runner Requirements

For optimal performance, self-hosted runners with the pdf-generation label should have:

# LaTeX and dependencies pre-installed
sudo apt-get install -y texlive texlive-lang-cyrillic texlive-latex-extra python-pygments ghostscript

✅ Benefits

  • ⚡ Faster CI: PDF generation doesn't block other jobs
  • 📖 Better UX: Single documentation entry point
  • 🔄 Unified Process: One script handles all documentation types
  • 🛡️ Resilient: Works even if PDF generation fails
  • 🎯 Maintainable: Scripts versioned with repository

🧪 Testing

The implementation:

  • ✅ Maintains backward compatibility
  • ✅ Gracefully handles PDF generation failures
  • ✅ Creates proper GitHub Pages deployment
  • ✅ Follows existing repository patterns

🤖 This PR was automatically generated to solve issue #59

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #59
@konard konard self-assigned this Sep 10, 2025
konard and others added 2 commits September 10, 2025 18:38
- Move PDF generation to self-hosted runners with 'pdf-generation' label for improved performance
- Implement artifact-based workflow to separate heavy PDF processing from documentation deployment
- Create unified documentation publishing script that combines API docs and PDF
- Add graceful fallback when PDF generation is unavailable
- Generate unified landing page with navigation for both API reference and PDF documentation

Fixes #59

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Move PDF generation to another virtual machine to speed up the publication Move PDF generation to dedicated VM and unify documentation publishing Sep 10, 2025
@konard konard marked this pull request as ready for review September 10, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move PDF generation to another virtual machine to speed up the publication

2 participants