From 4cf6dec78ccc1ddee0d1a0d16563930f71d37ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Heleno?= Date: Thu, 17 Oct 2024 00:28:58 +0200 Subject: [PATCH] docs: release JavaDocs using Maven --- .github/workflows/publish-javadoc.yaml | 40 +++++++++++++++++++------- dependency-reduced-pom.xml | 8 ++++++ pom.xml | 11 +++++++ 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish-javadoc.yaml b/.github/workflows/publish-javadoc.yaml index 579d1fd..c761f63 100644 --- a/.github/workflows/publish-javadoc.yaml +++ b/.github/workflows/publish-javadoc.yaml @@ -6,15 +6,35 @@ on: - main jobs: - publish-javadoc: + build: runs-on: ubuntu-latest steps: - - name: Deploy JavaDoc documentation - uses: MathieuSoysal/Javadoc-publisher.yml@main - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - javadoc-branch: javadoc - java-version: 17 - project: maven - javadoc-source-folder: . - custom-command: javadoc -d . -private -sourcepath src/main/java/ch/heigvd/dai -subpackages commands -subpackages exceptions -subpackages utilities + - name: "Check out the repository" + uses: actions/checkout@v4 + + - name: "Setup Java and Maven" + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + + - name: "Build JavaDoc using Maven" + run: mvn javadoc:javadoc + + - name: "Upload JavaDoc as an artifact" + id: deployment + uses: actions/upload-pages-artifact@v3 + with: + path: target/reports/apidocs + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: "Deploy to GitHub Pages" + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml index c66de88..9ffd411 100644 --- a/dependency-reduced-pom.xml +++ b/dependency-reduced-pom.xml @@ -33,6 +33,14 @@ + + maven-javadoc-plugin + 3.10.1 + + private + true + + maven-shade-plugin 3.6.0 diff --git a/pom.xml b/pom.xml index 9b6cd02..6bc4b72 100644 --- a/pom.xml +++ b/pom.xml @@ -53,6 +53,17 @@ + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.10.1 + + private + true + + + org.apache.maven.plugins