You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by tw...@apache.org on 2025/04/22 09:05:12 UTC

(mina-sshd) branch dev_3.0 updated (a3f6b83a8 -> e0d21d837)

This is an automated email from the ASF dual-hosted git repository.

twolf pushed a change to branch dev_3.0
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git


 discard a3f6b83a8 [releng] Fix site building
     new e0d21d837 [releng] Fix site building

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (a3f6b83a8)
            \
             N -- N -- N   refs/heads/dev_3.0 (e0d21d837)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/next-build.yml | 4 ++--
 pom.xml                          | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)


(mina-sshd) 01/01: [releng] Fix site building

Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

twolf pushed a commit to branch dev_3.0
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git

commit e0d21d8378e5d0949ac51072fd6673c2a5ba0da0
Author: Thomas Wolf <tw...@apache.org>
AuthorDate: Mon Apr 21 20:18:29 2025 +0200

    [releng] Fix site building
    
    Skip reports completely, ensure the site is _not_ deployed via
    maven-site-plugin (we use maven-scm-publish-plugin to push the site
    to branch gh-pages), and fix the build step in the Github workflow
    that publishes to gh-pages.
---
 .github/workflows/next-build.yml | 13 +++++--------
 pom.xml                          | 14 ++++++++++++++
 sshd-site/pom.xml                | 12 +++++-------
 3 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/next-build.yml b/.github/workflows/next-build.yml
index e04bf3d94..0ad28e708 100644
--- a/.github/workflows/next-build.yml
+++ b/.github/workflows/next-build.yml
@@ -73,13 +73,10 @@ jobs:
         run: |
           export PROJECT_VERSION=$(mvn -B -q -DforceStdout -Dexpression=project.version help:evaluate)
           echo "Project version: $PROJECT_VERSION"
-          [[ "$PROJECT_VERSION" =~ ^3\.[0-9]+\.[0-9]+-SNAPSHOT$ ]] || [[ "$PROJECT_VERSION" =~ ^3\.[0-9]+\.[0-9]+-M[1-9]$ ]] || {
+          [[ "$PROJECT_VERSION" =~ ^3\.[0-9]+\.[0-9]+-SNAPSHOT$ ]] || {
             echo "**** Skipping deployment because not a snapshot version: $PROJECT_VERSION" 1>&2
             echo "SKIP_DEPLOYMENT=true" >> "$GITHUB_ENV"
           }
-          if [[ "$PROJECT_VERSION" =~ ^3\.[0-9]+\.[0-9]+-M[1-9]$ ]]; then
-            echo "DEPLOY_WEBSITE=true" >> "$GITHUB_ENV"
-          fi
 
       - name: Check HEAD is current
         # Must be quoted, ! is special in yaml
@@ -109,9 +106,9 @@ jobs:
         run: mvn -B --errors --activate-profiles ci --no-transfer-progress deploy -DskipTests -DdeployAtEnd
 
       - name: Build and deploy web site
-        if: env.DEPLOY_WEBSITE
+        if: "! env.SKIP_DEPLOYMENT"
         run: |
-          git config --global user.name '${{ github.actor }}'
-          git config --global user.email '41898282+${{ github.actor }}@users.noreply.github.com'
+          git config user.name "github-actions[bot]"
+          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
           mvn -B --no-transfer-progress -DskipTests -Pjapicmp clean install
-          mvn scm-publish:publish-scm -rf :sshd-site
+          mvn -B --no-transfer-progress scm-publish:publish-scm -Dgithub.actor=${{ github.actor }} -Dgithub.token=${{ secrets.GITHUB_TOKEN }}
diff --git a/pom.xml b/pom.xml
index c811e21c6..b05fcad83 100644
--- a/pom.xml
+++ b/pom.xml
@@ -126,6 +126,8 @@
 
         <dependency.download.silent>true</dependency.download.silent>
         <bnd.extraImports />
+        <github.actor />
+        <github.token />
     </properties>
 
     <profiles>
@@ -1070,6 +1072,14 @@
                         <staticGroups>java.,javax.,org.w3c.,org.xml.,junit.</staticGroups>
                     </configuration>
                 </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-scm-publish-plugin</artifactId>
+                    <configuration>
+                        <scmBranch>gh-pages</scmBranch>
+                        <content>${project.build.directory}/staging/sshd-site</content>
+                    </configuration>
+                </plugin>
             </plugins>
         </pluginManagement>
 
@@ -1387,6 +1397,10 @@
     </build>
     
     <distributionManagement>
+        <site>
+            <id>github</id>
+            <url>scm:git:https://${github.actor}:${github.token}@github.com/apache/mina-sshd.git</url>
+        </site>
         <repository>
             <id>dummy</id>
             <name>Dummy to avoid accidental deploys</name>
diff --git a/sshd-site/pom.xml b/sshd-site/pom.xml
index 2ab2bfeed..2a633fc3a 100644
--- a/sshd-site/pom.xml
+++ b/sshd-site/pom.xml
@@ -128,6 +128,10 @@
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-site-plugin</artifactId>
+                        <configuration>
+                            <!-- We deploy using maven-scm-publish-plugin in the GitHub workflow. -->
+                            <skipDeploy>true</skipDeploy>
+                        </configuration>
                         <executions>
                             <!-- Assemble the site -->
                             <execution>
@@ -138,6 +142,7 @@
                                 </goals>
                                 <configuration>
                                     <siteDirectory>${project.build.directory}/src/site</siteDirectory>
+                                    <generateReports>false</generateReports>
                                 </configuration>
                             </execution>
                             <!-- And finally stage it -->
@@ -181,11 +186,4 @@
         </plugins>
     </reporting>
 
-    <distributionManagement>
-        <site>
-            <id>devwebsite</id>
-            <url>scm:git:ssh://git@github.com/apache/mina-sshd.git</url>
-        </site>
-    </distributionManagement>
-    
 </project>