Merge pull request #101 from wimdeblauwe/feature/gh-100 #244
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: Build | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
name: "Build with ${{ matrix.java }}" | |
strategy: | |
matrix: | |
java: [ 17 ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup java ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
cache: maven | |
- name: Build with Maven | |
run: ./mvnw -B -ntp clean verify | |
- name: Set Release version env variable | |
run: | | |
echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | |
- name: GitHub Pages action | |
if: | | |
github.ref == 'refs/heads/master' && | |
matrix.java == 17 | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./target/generated-docs | |
destination_dir: current | |
exclude_assets: 'img/banner-logo.svg,img/doc-background.svg,img/doc-background-dark.svg' | |
- name: GitHub Pages action (versioned dir) | |
if: | | |
github.ref == 'refs/heads/master' && | |
matrix.java == 17 | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./target/generated-docs | |
destination_dir: ${{ env.RELEASE_VERSION }} | |
exclude_assets: 'img/banner-logo.svg,img/doc-background.svg,img/doc-background-dark.svg' |