workflows and tests updated (#7) #1
This file contains 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: Deploy Javadoc to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Set up Maven | |
run: mvn -B wrapper:wrapper | |
- name: Generate Javadoc | |
run: mvn -B javadoc:javadoc | |
# By default, this generates Javadoc in the target/site/apidocs/ directory | |
- name: Verify Javadoc Directory | |
run: | | |
if [ -d "target/site/apidocs" ]; then | |
echo "Javadoc generated successfully"; | |
ls -la target/site/apidocs; | |
else | |
echo "Javadoc directory not found!"; | |
exit 1; | |
fi | |
- name: Deploy Javadoc to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: target/site/apidocs |