Skip to content

Update build.yml

Update build.yml #18

Workflow file for this run

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