diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml new file mode 100644 index 0000000..232c452 --- /dev/null +++ b/.github/workflows/site.yml @@ -0,0 +1,61 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Site CI + +on: + push: + branches: + - '*' + - '!master' + pull_request: + branches: + - '*' + - '!master' + +jobs: + + site: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + cache: 'maven' + + - name: Setup deploy + id: setup + if: github.event_name == 'push' && github.repository_owner == 'codehaus-plexus' && github.ref == 'refs/heads/source' + env: + COMMIT_EMAIL: ${{ github.event.head_commit.author.email }} + COMMIT_NAME: ${{ github.event.head_commit.author.name }} + COMMIT_ID: ${{ github.event.head_commit.id }} + run: | + git config --global user.email "$COMMIT_EMAIL" + git config --global user.name "$COMMIT_NAME" + echo "deploy=-deploy -Dusername=git -Dpassword=${{ github.token }} -Dscmpublish.checkinComment='Site checkin for $COMMIT_ID'" >> "$GITHUB_OUTPUT" + + - name: Build with Maven + run: mvn --show-version --errors --batch-mode --update-snapshots clean site${{ steps.setup.outputs.deploy }}