Port C# @name parameter fixes to Swift MySQL and Postgres drivers #29
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: Documentation | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'Sources/**' | |
| - 'Package.swift' | |
| - 'Package.resolved' | |
| workflow_dispatch: # allow manual trigger | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build-docs: | |
| name: Build DocC | |
| runs-on: macos-15 # Xcode 16 / Swift 6 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Cache SPM | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: macos-spm-docs-v2-${{ hashFiles('Package.resolved') }} | |
| restore-keys: | | |
| macos-spm-docs-v2- | |
| - name: Setup GitHub Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Build documentation for all modules | |
| run: | | |
| mkdir -p docs | |
| for TARGET in CosmoSQLCore CosmoMSSQL CosmoPostgres CosmoMySQL CosmoSQLite; do | |
| echo "▶ Building docs for $TARGET" | |
| swift package \ | |
| --allow-writing-to-directory "docs/$TARGET" \ | |
| generate-documentation \ | |
| --target "$TARGET" \ | |
| --disable-indexing \ | |
| --transform-for-static-hosting \ | |
| --hosting-base-path "CosmoSQLClient-Swift/$TARGET" \ | |
| --output-path "docs/$TARGET" | |
| done | |
| # Create a landing index.html that links to each module's docs | |
| - name: Generate landing page | |
| run: | | |
| cat > docs/index.html << 'HTML' | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>CosmoSQLClient-Swift Documentation</title> | |
| <style> | |
| body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; | |
| max-width: 720px; margin: 60px auto; padding: 0 24px; color: #1d1d1f; } | |
| h1 { font-size: 2rem; margin-bottom: 0.25em; } | |
| p { color: #6e6e73; } | |
| ul { list-style: none; padding: 0; display: grid; gap: 12px; margin-top: 32px; } | |
| li a { display: block; padding: 20px 24px; border: 1px solid #d2d2d7; | |
| border-radius: 12px; text-decoration: none; color: inherit; | |
| transition: box-shadow .15s; } | |
| li a:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); } | |
| li a strong { display: block; font-size: 1.1rem; color: #0071e3; } | |
| li a span { font-size: .9rem; color: #6e6e73; margin-top: 4px; display: block; } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>CosmoSQLClient-Swift</h1> | |
| <p>A unified Swift NIO-based SQL driver for SQL Server, PostgreSQL, MySQL, and SQLite.</p> | |
| <ul> | |
| <li><a href="CosmoSQLCore/documentation/cosmosqlcore/"> | |
| <strong>CosmoSQLCore</strong> | |
| <span>Shared protocol, types & utilities — SQLDatabase, SQLValue, SQLRow, SQLDataTable</span> | |
| </a></li> | |
| <li><a href="CosmoMSSQL/documentation/cosmomssql/"> | |
| <strong>CosmoMSSQL</strong> | |
| <span>Microsoft SQL Server driver — TDS 7.4 wire protocol, NTLM auth, stored procedures</span> | |
| </a></li> | |
| <li><a href="CosmoPostgres/documentation/cosmopostgres/"> | |
| <strong>CosmoPostgres</strong> | |
| <span>PostgreSQL driver — wire protocol v3, SCRAM-SHA-256 auth</span> | |
| </a></li> | |
| <li><a href="CosmoMySQL/documentation/cosmomysql/"> | |
| <strong>CosmoMySQL</strong> | |
| <span>MySQL / MariaDB driver — wire protocol v10, caching_sha2_password auth</span> | |
| </a></li> | |
| <li><a href="CosmoSQLite/documentation/cosmosqlite/"> | |
| <strong>CosmoSQLite</strong> | |
| <span>Embedded SQLite — in-memory & file databases, native binary backup</span> | |
| </a></li> | |
| </ul> | |
| </body> | |
| </html> | |
| HTML | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs | |
| deploy-docs: | |
| name: Deploy to GitHub Pages | |
| needs: build-docs | |
| runs-on: ubuntu-24.04 | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |