Skip to content

Commit

Permalink
Changed to maven-scm-publish-plugin for site deploy (#113)
Browse files Browse the repository at this point in the history
It's much faster.
  • Loading branch information
freemanjp authored Sep 13, 2018
1 parent c304434 commit 94259de
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 31 deletions.
10 changes: 7 additions & 3 deletions .travis/deploy-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

set -e

./mvnw site-deploy \
--settings .travis/settings.xml \
-P site-deploy \
mvn site \
-DskipTests \
-Dinvoker.skip=true \
--batch-mode \
--show-version

mvn scm-publish:publish-scm \
--settings .travis/settings.xml \
-DskipTests \
-Dinvoker.skip=true \
--batch-mode
1 change: 1 addition & 0 deletions .travis/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</server>
<server>
<id>github</id>
<username>${env.GITHUB_USER}</username>
<password>${env.GITHUB_OAUTH2TOKEN}</password>
</server>
</servers>
Expand Down
43 changes: 15 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,6 @@
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.12</version>
</plugin>
<plugin>
<groupId>io.github.zlika</groupId>
<artifactId>reproducible-build-maven-plugin</artifactId>
Expand Down Expand Up @@ -583,6 +578,16 @@
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
<version>3.0.0</version>
<extensions>true</extensions>
<configuration>
<scmBranch>gh-pages</scmBranch>
<serverId>github</serverId>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
Expand Down Expand Up @@ -1127,6 +1132,11 @@
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<site>
<id>github-pages-site</id>
<name>Deployment through Apache Maven SCM Publish Plugin</name>
<url>scm:git:https://github.com/gantsign/ktlint-maven-plugin.git</url>
</site>
</distributionManagement>

<profiles>
Expand Down Expand Up @@ -1179,29 +1189,6 @@
</plugins>
</build>
</profile>
<profile>
<id>site-deploy</id>
<build>
<plugins>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<configuration>
<server>github</server>
<message>Creating site for ${project.version}</message>
</configuration>
<executions>
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>site</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Empty file added src/site/resources/.nojekyll
Empty file.

0 comments on commit 94259de

Please sign in to comment.