Skip to content

Commit af1bc28

Browse files
committed
re-enable site deployment
1 parent 134aba3 commit af1bc28

2 files changed

Lines changed: 30 additions & 3 deletions

File tree

.github/workflows/maven-deploy.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,11 @@ jobs:
3333
env:
3434
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
3535
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
36-
run: mvn -s ./.maven-settings.xml -Pcontinuous-integration -B -U clean deploy
36+
run: mvn -s ./.maven-settings.xml -Pcontinuous-integration -B -U clean deploy site
37+
38+
- name: Stage and deploy site
39+
run: >
40+
mvn -s ./.maven-settings.xml -Pcontinuous-integration -B site:stage scm-publish:publish-scm
41+
-Dscmpublish.checkinComment="Maven site: ${{ github.repository }}"
42+
-Dusername=${{ secrets.GH_SITE_DEPLOY_USERNAME }}
43+
-Dpassword=${{ secrets.GH_SITE_DEPLOY_PAT }}

pom.xml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,12 @@ under the License.
353353
</plugins>
354354
</pluginManagement>
355355
<plugins>
356+
356357
<plugin>
357358
<groupId>org.apache.maven.plugins</groupId>
358359
<artifactId>maven-plugin-plugin</artifactId>
359360
</plugin>
361+
360362
<plugin>
361363
<artifactId>maven-enforcer-plugin</artifactId>
362364
<executions>
@@ -377,6 +379,7 @@ under the License.
377379
</execution>
378380
</executions>
379381
</plugin>
382+
380383
<plugin>
381384
<artifactId>maven-surefire-plugin</artifactId>
382385
<configuration>
@@ -394,6 +397,24 @@ under the License.
394397
<argLine>${maven.test.jvmargs}</argLine>
395398
</configuration>
396399
</plugin>
400+
401+
<plugin>
402+
<groupId>org.apache.maven.plugins</groupId>
403+
<artifactId>maven-site-plugin</artifactId>
404+
<configuration>
405+
<topSiteURL>${site.deploy.url}</topSiteURL>
406+
</configuration>
407+
</plugin>
408+
409+
<plugin>
410+
<groupId>org.apache.maven.plugins</groupId>
411+
<artifactId>maven-scm-publish-plugin</artifactId>
412+
<configuration>
413+
<subDirectory>${site.url.module.prefix}</subDirectory>
414+
<skipDeletedFiles>true</skipDeletedFiles>
415+
</configuration>
416+
</plugin>
417+
397418
</plugins>
398419
</build>
399420

@@ -668,8 +689,7 @@ under the License.
668689
<distributionManagement>
669690
<site>
670691
<id>${site.deploy.id}</id>
671-
<name>Maven Site Deployment</name>
672-
<url>${site.deploy.url}/${site.url.module.prefix}</url>
692+
<url>${site.deploy.url}</url>
673693
</site>
674694
</distributionManagement>
675695

0 commit comments

Comments
 (0)