From 34491281a8577aba60d4f343b1b578b131b64a80 Mon Sep 17 00:00:00 2001 From: Pavel Horal Date: Wed, 21 Feb 2024 17:10:36 +0100 Subject: [PATCH] Fix GH Action config. --- .github/workflows/build.yml | 22 +++++++++------------- .github/workflows/deploy.yml | 13 +++++-------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7294b8e56..862cb19e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,16 +12,12 @@ jobs: java: [11, 17] name: "Java ${{ matrix.java }} build" steps: - - uses: actions/checkout@v2 - - name: Set up Java - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Cache Maven packages - uses: actions/cache@v2 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Check - run: mvn -B verify + - uses: actions/checkout@v4 + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "${{ matrix.java }}" + cache: "maven" + - name: Check + run: mvn -B verify diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 46aeee53b..41ad82a03 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: deploy +name: Deploy Pages on: push: @@ -24,15 +24,12 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: - java-version: 17 - - uses: actions/cache@v4 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 + distribution: "temurin" + java-version: "17" + cache: "maven" - run: mvn -Pmetrics site site:deploy - uses: actions/configure-pages@v4 - uses: actions/upload-pages-artifact@v3 with: - path: './target/deploy/' + path: "./target/deploy/" - uses: actions/deploy-pages@v4