Audit logging ADR #4
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: Scaladoc | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| scaladoc: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| - name: Cache SBT and dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.ivy2/cache | |
| ~/.cache/coursier | |
| ~/.sbt | |
| **/target | |
| key: ${{ runner.os }}-sbt-docs-${{ hashFiles('**/build.sbt', '**/project/**/*.sbt', '**/project/**/*.scala') }} | |
| restore-keys: | | |
| ${{ runner.os }}-sbt-docs- | |
| - name: Generate Scaladoc | |
| run: | | |
| sbt -batch doc | |
| mkdir -p site/api | |
| # Collect per-module docs under site/api/<module> | |
| for d in modules/*; do | |
| [ -d "$d/target/scala-2.13/api" ] || continue | |
| name=$(basename "$d") | |
| mkdir -p "site/api/$name" | |
| cp -a "$d/target/scala-2.13/api/." "site/api/$name/" | |
| done | |
| # Root aggregated docs if any | |
| if [ -d target/scala-2.13/api ]; then | |
| mkdir -p site/api/root | |
| cp -a target/scala-2.13/api/. site/api/root/ | |
| fi | |
| # Create simple index page linking to module APIs | |
| cat > site/index.html <<'HTML' | |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <title>FlowForge API Docs</title> | |
| <style> | |
| body { font-family: -apple-system, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif; margin: 2rem; } | |
| h1 { margin-bottom: 0.5rem; } | |
| ul { line-height: 1.8; } | |
| .note { color: #555; margin-top: 1rem; } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>FlowForge API Docs</h1> | |
| <p>Scaladoc per module:</p> | |
| <ul> | |
| <li><a href="api/core/index.html">core</a></li> | |
| <li><a href="api/contracts/index.html">contracts</a></li> | |
| <li><a href="api/contracts-sdk/index.html">contracts-sdk</a></li> | |
| <li><a href="api/engines-spark/index.html">engines-spark</a></li> | |
| <li><a href="api/engines-flink/index.html">engines-flink</a></li> | |
| <li><a href="api/connectors/index.html">connectors</a></li> | |
| <li><a href="api/connectors-gcs/index.html">connectors-gcs</a></li> | |
| <li><a href="api/connectors-jdbc/index.html">connectors-jdbc</a></li> | |
| <li><a href="api/quality-deequ/index.html">quality-deequ</a></li> | |
| <li><a href="api/examples/index.html">examples</a></li> | |
| </ul> | |
| <p class="note">Generated from main on each push.</p> | |
| </body> | |
| </html> | |
| HTML | |
| - name: Deploy to GitHub Pages | |
| if: ${{ !env.ACT }} | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: ./site | |
| keep_files: false | |
| cname: '' |