Skip to content

Commit c158089

Browse files
author
Isaac Brodsky
authored
Publish Javadocs to Github Pages (#95)
1 parent 5982f85 commit c158089

File tree

7 files changed

+49
-10
lines changed

7 files changed

+49
-10
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: mvn com.spotify.fmt:fmt-maven-plugin:check
4141

4242
- name: Tests
43-
run: mvn "-Dh3.remove.images=true" -B -V clean test
43+
run: mvn "-Dh3.remove.images=true" -B -V clean test site
4444

4545
tests-no-docker:
4646
name: Java (No Docker) ${{ matrix.java-version }} ${{ matrix.os }}
@@ -72,7 +72,7 @@ jobs:
7272
${{ runner.os }}-maven-
7373
7474
- name: Tests
75-
run: mvn -B -V clean test
75+
run: mvn -B -V clean test site
7676

7777
tests-coverage:
7878
name: Java (Coverage) ${{ matrix.java-version }} ${{ matrix.os }}

.github/workflows/website.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
# This job installs dependencies, builds the website, and pushes it to `gh-pages`
8+
jobs:
9+
deploy-website:
10+
name: Deploy website
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/[email protected]
15+
16+
- uses: actions/setup-java@v2
17+
with:
18+
distribution: "adopt"
19+
java-version: "15"
20+
21+
- uses: actions/cache@v2
22+
id: maven-cache
23+
with:
24+
path: ~/.m2/
25+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
26+
restore-keys: |
27+
${{ runner.os }}-maven-
28+
29+
- name: Javadocs Build
30+
working-directory: website
31+
run: |
32+
mvn -B -C clean site -Dh3.use.docker=false
33+
34+
# Deploy the book's HTML to gh-pages branch
35+
- name: GitHub Pages action
36+
uses: peaceiris/[email protected]
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: target/site/apidocs/

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,9 @@
363363
</configuration>
364364
</plugin>
365365
<plugin>
366-
<groupId>org.codehaus.mojo</groupId>
367-
<artifactId>findbugs-maven-plugin</artifactId>
368-
<version>3.0.0</version>
366+
<groupId>com.github.spotbugs</groupId>
367+
<artifactId>spotbugs-maven-plugin</artifactId>
368+
<version>4.5.3.0</version>
369369
</plugin>
370370
<plugin>
371371
<groupId>org.apache.maven.plugins</groupId>

src/test/java/com/uber/h3core/TestH3CoreLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.io.IOException;
2222
import org.junit.Test;
2323

24-
/** H3CoreLoader is mostly tested by {@link TestH3Core}. This also tests OS detection. */
24+
/** H3CoreLoader is mostly tested by {@link TestH3CoreFactory}. This also tests OS detection. */
2525
public class TestH3CoreLoader {
2626
@Test
2727
public void testDetectOs() {

src/test/java/com/uber/h3core/TestH3CoreLoaderLocale.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
import org.junit.Test;
2525

2626
/**
27-
* H3CoreLoader is mostly tested by {@link TestH3Core}. This also tests OS detection under different
28-
* locales.
27+
* H3CoreLoader is mostly tested by {@link TestH3CoreFactory}. This also tests OS detection under
28+
* different locales.
2929
*/
3030
@NotThreadSafe
3131
public class TestH3CoreLoaderLocale {

src/test/java/com/uber/h3core/v3/BaseTestH3CoreV3.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import java.io.IOException;
2020
import org.junit.BeforeClass;
2121

22-
/** Base class for tests of the class {@link H3Core} */
22+
/** Base class for tests of the class {@link H3CoreV3} */
2323
public abstract class BaseTestH3CoreV3 {
2424
public static final double EPSILON = 1e-6;
2525

src/test/java/com/uber/h3core/v3/TestMiscellaneous.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import java.util.Collection;
2626
import org.junit.Test;
2727

28-
/** Tests for {@link H3Core} instantiation and miscellaneous functions. */
28+
/** Tests for {@link com.uber.h3core.H3CoreV3} instantiation and miscellaneous functions. */
2929
public class TestMiscellaneous extends BaseTestH3CoreV3 {
3030
@Test
3131
public void testConstants() {

0 commit comments

Comments
 (0)