diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3b65e54..a97722f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -40,14 +40,16 @@ jobs: java-version: 21 cache: maven - - name: Build project (resolve deps + compile, skip tests) + - name: Build project (compile + resolve deps, skip tests) run: mvn -B --settings .github/settings.xml clean verify -DskipTests env: MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} - # javadoc:aggregate gira sulla root del progetto. - # L'output viene scritto in target/site/apidocs/ (root), NON in flash/target/... + # javadoc:aggregate runs on the reactor root. + # With flash + flash-extensions both declared as modules in root pom.xml, + # this produces a single aggregated Javadoc covering all modules. + # Default output path: target/site/apidocs/ (no custom reportOutputDirectory set). - name: Generate aggregated JavaDoc run: mvn -B --settings .github/settings.xml javadoc:aggregate -DskipTests env: @@ -57,10 +59,13 @@ jobs: - name: Verify JavaDoc output exists run: | if [ ! -f "target/site/apidocs/index.html" ]; then - echo "ERROR: target/site/apidocs/index.html not found. JavaDoc generation failed." + echo "ERROR: target/site/apidocs/index.html not found." + echo "Contents of target/site (if any):" + find target/site -maxdepth 3 2>/dev/null || echo "(empty)" exit 1 fi - echo "JavaDoc OK — $(find target/site/apidocs -name '*.html' | wc -l) HTML files generated." + COUNT=$(find target/site/apidocs -name '*.html' | wc -l) + echo "JavaDoc OK — $COUNT HTML files at target/site/apidocs/" - name: Checkout gh-pages uses: actions/checkout@v4 @@ -72,10 +77,8 @@ jobs: - name: Copy JavaDoc to versioned folder and latest run: | VERSION=${{ inputs.version }} - # Versioned snapshot mkdir -p gh-pages-out/javadoc/$VERSION cp -r target/site/apidocs/. gh-pages-out/javadoc/$VERSION/ - # Always-current alias rm -rf gh-pages-out/latest mkdir -p gh-pages-out/latest cp -r target/site/apidocs/. gh-pages-out/latest/ @@ -96,38 +99,226 @@ jobs: reverse=True ) + latest = versions[0] if versions else None + rows = "\n".join( - f'
Browse the published API documentation for each release.
-+ API documentation for all published Flash releases. +
+ + """ + ( + f''' + + Latest release — {latest} + + ''' + if latest else "" + ) + """ +