Skip to content

Commit c64c195

Browse files
authored
Merge branch 'master' into breaking-change/remove-shading-http
2 parents 67f94b8 + 13c7a91 commit c64c195

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Generate Java Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up JDK 11
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: 11
20+
distribution: corretto
21+
22+
- name: Build with Maven
23+
run: mvn clean install
24+
25+
- name: Generate Javadocs
26+
run: mvn javadoc:javadoc
27+
28+
# Publishes Javadocs to GitHub Pages by pushing to `gh-pages` branch
29+
- name: Deploy Javadocs to GitHub Pages
30+
run: |
31+
git config --global user.name 'github-actions[bot]'
32+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
33+
mvn scm-publish:publish-scm
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,15 @@
391391
<plugins>
392392
<plugin>
393393
<artifactId>maven-compiler-plugin</artifactId>
394+
<executions>
395+
<execution>
396+
<id>default-compile</id>
397+
<phase>generate-sources</phase>
398+
<goals>
399+
<goal>compile</goal>
400+
</goals>
401+
</execution>
402+
</executions>
394403
<configuration>
395404
<source>11</source>
396405
<target>11</target>
@@ -475,6 +484,7 @@
475484
<plugin>
476485
<groupId>org.apache.maven.plugins</groupId>
477486
<artifactId>maven-javadoc-plugin</artifactId>
487+
<version>3.3.1</version>
478488
<executions>
479489
<execution>
480490
<id>attach-javadocs</id>
@@ -488,6 +498,16 @@
488498
<doclint>none</doclint>
489499
</configuration>
490500
</plugin>
501+
<plugin>
502+
<groupId>org.apache.maven.plugins</groupId>
503+
<artifactId>maven-scm-publish-plugin</artifactId>
504+
<version>1.0</version>
505+
<configuration>
506+
<content>target/site/apidocs</content>
507+
<pubScmUrl>scm:git:git@github.com:spotify/github-java-client.git</pubScmUrl>
508+
<scmBranch>gh-pages</scmBranch>
509+
</configuration>
510+
</plugin>
491511
</plugins>
492512
<pluginManagement>
493513
<plugins>

0 commit comments

Comments
 (0)