Update pom.xml #19
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: Java CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build | |
| run: mvn -B compile --file pom.xml | |
| - name: Run Tests | |
| run: mvn -B test --file pom.xml | |
| - name: Generate Javadoc | |
| if: success() | |
| run: mvn javadoc:javadoc | |
| - name: Deploy Javadoc to GitHub Pages | |
| if: success() | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./target/site/apidocs | |
| publish_branch: javadoc |