Skip to content

Commit

Permalink
test moving site publish to own workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cfkoehler committed Jan 7, 2025
1 parent 38b288d commit baa6588
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/maven-publish-site.yml
Original file line number Diff line number Diff line change
@@ -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 }}
6 changes: 0 additions & 6 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/') }}
Expand Down

0 comments on commit baa6588

Please sign in to comment.