From baa658835519dfef22faa9c3173703907f026076 Mon Sep 17 00:00:00 2001 From: Connor Date: Mon, 6 Jan 2025 20:58:05 -0500 Subject: [PATCH] test moving site publish to own workflow --- .github/workflows/maven-publish-site.yml | 35 ++++++++++++++++++++++++ .github/workflows/maven-release.yml | 6 ---- 2 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/maven-publish-site.yml diff --git a/.github/workflows/maven-publish-site.yml b/.github/workflows/maven-publish-site.yml new file mode 100644 index 0000000000..f0506f6f3e --- /dev/null +++ b/.github/workflows/maven-publish-site.yml @@ -0,0 +1,35 @@ +--- +name: "Maven: Publish Site to GitHub Pages" + +on: # yamllint disable-line rule:truthy + workflow_dispatch: +# Release trigger does not work because the release job uses GITHUB_TOKEN +# release: +# types: [created] + +env: + JAVA_VERSION: "11" + JAVA_DISTRIBUTION: "corretto" + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK ${{ env.JAVA_VERSION }} + uses: actions/setup-java@v4 + with: + java-version: ${{ env.JAVA_VERSION }} + distribution: ${{ env.JAVA_DISTRIBUTION }} + cache: "maven" + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + + - name: Publish site to GitHub Pages + run: mvn site site:stage scm-publish:publish-scm -Pcoverage,pmd -DskipTests + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/maven-release.yml b/.github/workflows/maven-release.yml index 44d854a374..13075a7c60 100644 --- a/.github/workflows/maven-release.yml +++ b/.github/workflows/maven-release.yml @@ -132,12 +132,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Publish site to GitHub Pages - run: mvn site site:stage scm-publish:publish-scm -Pcoverage,pmd -DskipTests - continue-on-error: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Delete branch continue-on-error: true if: ${{ github.event.inputs.release_type == 'patch' && startsWith(github.ref_name, 'patch/') }}