Skip to content

Fix javadoc workflow unable to generate docs #26

Fix javadoc workflow unable to generate docs

Fix javadoc workflow unable to generate docs #26

name: Deploy Javadoc
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
environment: jdk21-flat
permissions:
contents: write # if you have a protection rule on your repository, you'll need to give write permission to the workflow.
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK ${{ vars.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
java-version: ${{ vars.JAVA_VERSION }}
distribution: ${{ vars.JAVA_DISTRIBUTION }}
- name: Cache Maven dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Deploy JavaDoc 🚀
uses: MathieuSoysal/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
javadoc-branch: javadoc
java-version: ${{ vars.JAVA_VERSION }}
target-folder: javadoc # url will be https://<username>.github.io/<repo>/javadoc, This can be left as nothing to generate javadocs in the root folder.
project: maven # or gradle
custom-command: javadoc -d javadoc -sourcepath -Xdoclint:all,-missing src/main/java -subpackages .