Skip to content

Commit

Permalink
Add javadoc publishing code (#463)
Browse files Browse the repository at this point in the history
add javadoc publishing code
  • Loading branch information
TheGlitch76 committed Jul 7, 2023
1 parent 3bf3f67 commit 01a969e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
token: ${{ secrets.github_token }}
prefix: "build/${{ github.ref }}"

- run: ./gradlew build javadocJar publish --stacktrace
- run: ./gradlew build javadoc javadocJar publish --stacktrace
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
Expand All @@ -38,7 +38,21 @@ jobs:
SNAPSHOTS_USERNAME: ${{ secrets.SNAPSHOTS_USERNAME }}
SNAPSHOTS_PASSWORD: ${{ secrets.SNAPSHOTS_PASSWORD }}
BRANCH_NAME: ${{ github.ref }}

# Javadoc publishing
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: 'gh-pages'
path: 'gh-pages'
- run: |
rm -rf ./gh-pages/${GITHUB_REF##*/}/
mv ./build/docs/javadoc ./gh-pages/${GITHUB_REF##*/}/
cd gh-pages
git add .
git config user.name "Github Actions"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit --allow-empty -m "Publish javadoc from actions"
git push
- name: Update Quilt Meta
uses: quiltmc/update-quilt-meta@main
with:
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ javadoc {
addBooleanOption 'Xdoclint:syntax', true
addBooleanOption 'Xdoclint:reference', true
addBooleanOption 'Xdoclint:accessibility', true
addStringOption '-notimestamp'
}
source fileTree(fakeSourceDir) + sourceSets.constants.allJava + sourceSets.packageDocs.allJava
classpath = configurations.javadocClasspath + downloadMinecraftLibraries.outputs.files.asFileTree + mapNamedJar.outputs.files.asFileTree
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 01a969e

Please sign in to comment.