docs: Update README.md example #9
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: Test And Deploy | |
permissions: | |
contents: write | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java-version: ["8", "11", "16", "17", "21"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: "temurin" | |
- name: Set execute permission | |
run: | | |
chmod +x ./tools/mvn_test.sh | |
- name: Maven tests | |
run: | | |
./tools/mvn_test.sh | |
shell: bash | |
publish: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Deploy javadoc to Github Pages | |
uses: dev-vince/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
java-version: "8" | |
java-distribution: "adopt" # The distributor of the target JDK. See https://github.com/actions/setup-java for more information. | |
project: maven # The project type. | |
branch: "gh-pages" # The branch for the javadoc contents. |