Merge feature/htj2k-openjph-benchmark into main #152
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Documentation | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'Sources/**' | |
| - 'Documentation/**' | |
| - '**.md' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build-docs: | |
| name: Build Documentation | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode_16.0.app/Contents/Developer | |
| - name: Cache Swift Package Manager | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-spm-docs-${{ hashFiles('**/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm-docs- | |
| - name: Build DocC documentation for all modules | |
| run: | | |
| mkdir -p docs | |
| # Build documentation for each module | |
| for TARGET in DICOMKit DICOMCore DICOMNetwork DICOMWeb DICOMDictionary; do | |
| echo "Building documentation for $TARGET..." | |
| swift package --allow-writing-to-directory ./docs/$TARGET \ | |
| generate-documentation --target $TARGET \ | |
| --disable-indexing \ | |
| --transform-for-static-hosting \ | |
| --hosting-base-path DICOMKit/$TARGET \ | |
| --output-path ./docs/$TARGET || echo "Failed to build docs for $TARGET" | |
| done | |
| - name: Create index page | |
| run: | | |
| cat > docs/index.html << 'EOF' | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>DICOMKit Documentation</title> | |
| <style> | |
| body { | |
| font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; | |
| max-width: 800px; | |
| margin: 50px auto; | |
| padding: 20px; | |
| line-height: 1.6; | |
| } | |
| h1 { | |
| color: #333; | |
| border-bottom: 2px solid #007AFF; | |
| padding-bottom: 10px; | |
| } | |
| .module { | |
| background: #f6f8fa; | |
| border: 1px solid #e1e4e8; | |
| border-radius: 6px; | |
| padding: 20px; | |
| margin: 20px 0; | |
| } | |
| .module h2 { | |
| margin-top: 0; | |
| color: #007AFF; | |
| } | |
| a { | |
| color: #007AFF; | |
| text-decoration: none; | |
| } | |
| a:hover { | |
| text-decoration: underline; | |
| } | |
| .badge { | |
| display: inline-block; | |
| padding: 3px 8px; | |
| font-size: 12px; | |
| font-weight: 600; | |
| border-radius: 3px; | |
| margin-left: 10px; | |
| } | |
| .badge-primary { background: #007AFF; color: white; } | |
| .badge-secondary { background: #6c757d; color: white; } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>📚 DICOMKit Documentation</h1> | |
| <p>Welcome to the DICOMKit API documentation. DICOMKit is a pure Swift DICOM toolkit for Apple platforms.</p> | |
| <div class="module"> | |
| <h2>DICOMKit <span class="badge badge-primary">Main Module</span></h2> | |
| <p>High-level API for working with DICOM files, images, and data.</p> | |
| <a href="DICOMKit/documentation/dicomkit/">View Documentation →</a> | |
| </div> | |
| <div class="module"> | |
| <h2>DICOMCore <span class="badge badge-secondary">Core</span></h2> | |
| <p>Core DICOM parsing, data structures, and transfer syntax support.</p> | |
| <a href="DICOMCore/documentation/dicomcore/">View Documentation →</a> | |
| </div> | |
| <div class="module"> | |
| <h2>DICOMNetwork <span class="badge badge-secondary">Networking</span></h2> | |
| <p>DIMSE services for PACS connectivity (C-ECHO, C-FIND, C-MOVE, C-GET, C-STORE).</p> | |
| <a href="DICOMNetwork/documentation/dicomnetwork/">View Documentation →</a> | |
| </div> | |
| <div class="module"> | |
| <h2>DICOMWeb <span class="badge badge-secondary">Web Services</span></h2> | |
| <p>RESTful DICOM services (QIDO-RS, WADO-RS, STOW-RS, UPS-RS).</p> | |
| <a href="DICOMWeb/documentation/dicomweb/">View Documentation →</a> | |
| </div> | |
| <div class="module"> | |
| <h2>DICOMDictionary <span class="badge badge-secondary">Reference</span></h2> | |
| <p>DICOM tag and UID dictionaries for metadata lookup.</p> | |
| <a href="DICOMDictionary/documentation/dicomdictionary/">View Documentation →</a> | |
| </div> | |
| <hr style="margin: 40px 0;"> | |
| <p style="text-align: center; color: #666;"> | |
| <a href="https://github.com/Raster-Lab/DICOMKit">View on GitHub</a> | | |
| <a href="https://github.com/Raster-Lab/DICOMKit/blob/main/README.md">README</a> | | |
| <a href="https://github.com/Raster-Lab/DICOMKit/blob/main/CONTRIBUTING.md">Contributing</a> | |
| </p> | |
| </body> | |
| </html> | |
| EOF | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./docs | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| runs-on: ubuntu-latest | |
| needs: build-docs | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |