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 fc10e5e4ee29430be22a12bf812cedf7b1a4e2b2 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 | 14 ++++++-------- pom.xml | 14 ++++++++++++++ sshd-site/pom.xml | 18 +++++++++++------- sshd-site/src/site/markdown/index.md | 2 +- sshd-site/src/site/site.xml | 13 +++++++++++++ 5 files changed, 45 insertions(+), 16 deletions(-) diff --git a/.github/workflows/next-build.yml b/.github/workflows/next-build.yml index e04bf3d94..6339ba379 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,10 @@ 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" + # git config needs to be --global because scm-publish will clone the repo again. run: | - git config --global user.name '${{ github.actor }}' - git config --global user.email '41898282+${{ github.actor }}@users.noreply.github.com' + git config --global user.name "github-actions[bot]" + git config --global 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..cd2c23b3a 100644 --- a/sshd-site/pom.xml +++ b/sshd-site/pom.xml @@ -27,11 +27,13 @@ <artifactId>sshd-site</artifactId> <name>Apache Mina SSHD :: Site</name> <description>Build a small development website containing the japicmp reports.</description> + <url>https://apache.github.io/mina-sshd</url> <packaging>pom</packaging> <inceptionYear>2025</inceptionYear> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'</maven.build.timestamp.format> </properties> <build> @@ -128,6 +130,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 +144,11 @@ </goals> <configuration> <siteDirectory>${project.build.directory}/src/site</siteDirectory> + <generateReports>false</generateReports> + <!-- + Don't use the static, "reproducible builds" timestamp. + --> + <outputTimestamp>${maven.build.timestamp}</outputTimestamp> </configuration> </execution> <!-- And finally stage it --> @@ -181,11 +192,4 @@ </plugins> </reporting> - <distributionManagement> - <site> - <id>devwebsite</id> - <url>scm:git:ssh://g...@github.com/apache/mina-sshd.git</url> - </site> - </distributionManagement> - </project> diff --git a/sshd-site/src/site/markdown/index.md b/sshd-site/src/site/markdown/index.md index c5fda3817..1c57a6e17 100644 --- a/sshd-site/src/site/markdown/index.md +++ b/sshd-site/src/site/markdown/index.md @@ -31,6 +31,6 @@ still lives directly in the git repository and can be viewed as rendered web pag Release 3.0.0 will be a new major release and will contain many breaking API changes. It will not be API-compatible with the 2.X releases. There are [`japicmp`](https://siom79.github.io/japicmp) reports about the API changes available -here; see the menu on the left. (Most of the API changes affect only the `protected` API, +here; see the menu on the left. Most of the API changes affect only the `protected` API, i.e., the API for subclassing. But there are also changes in the `public` API that may affect user code. diff --git a/sshd-site/src/site/site.xml b/sshd-site/src/site/site.xml index f9a059bc9..552c38f99 100644 --- a/sshd-site/src/site/site.xml +++ b/sshd-site/src/site/site.xml @@ -19,12 +19,25 @@ limitations under the License. <publishDate format="yyyy-MM-dd" position="right" /> <version position="right" /> + <bannerLeft href="https://mina.apache.org/sshd-project"> + <image src="https://mina.apache.org/assets/img/header-sshd.png"/> + </bannerLeft> + <skin> <groupId>org.apache.maven.skins</groupId> <artifactId>maven-fluido-skin</artifactId> <version>2.1.0</version> </skin> + <custom> + <fluidoSkin> + <gitHub> + <projectId>apache/mina-sshd</projectId> + <ribbonOrientation>right</ribbonOrientation> + </gitHub> + </fluidoSkin> + </custom> + <body> <head> <![CDATA[<link rel="stylesheet" href="./css/custom.css" />]]>