From 5b72f396bbf7270cc6347ebd96c21afb112e5f87 Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Fri, 17 Jun 2022 15:09:32 +0200 Subject: [PATCH] docs: Publish javadocs to GH pages (#1824) * docs: Publish javadocs to GH pages * chore: Use up to date URLs * chore: Update README url --- .github/workflows/build.yml | 24 +++++++++++++ .github/workflows/codeql.yml.disabled | 37 -------------------- README.adoc | 3 +- buildSrc/src/main/kotlin/CommonJavaConfig.kt | 5 ++- 4 files changed, 27 insertions(+), 42 deletions(-) delete mode 100644 .github/workflows/codeql.yml.disabled diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7c7fd1f08..8c548fc61 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,6 +41,30 @@ jobs: env: ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} + - name: Publish core javadoc + if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}} + uses: cpina/github-action-push-to-another-repository@main + env: + SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} + with: + source-directory: 'worldedit-core/build/docs/javadoc' + destination-github-username: 'IntellectualSites' + destination-repository-name: 'fastasyncworldedit-javadocs' + user-email: ${{ secrets.USER_EMAIL }} + target-branch: main + target-directory: worldedit-core + - name: Publish bukkit javadoc + if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}} + uses: cpina/github-action-push-to-another-repository@main + env: + SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} + with: + source-directory: 'worldedit-bukkit/build/docs/javadoc' + destination-github-username: 'IntellectualSites' + destination-repository-name: 'fastasyncworldedit-javadocs' + user-email: ${{ secrets.USER_EMAIL }} + target-branch: main + target-directory: worldedit-bukkit - name: Archive Artifacts uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/codeql.yml.disabled b/.github/workflows/codeql.yml.disabled deleted file mode 100644 index 3f95014ac..000000000 --- a/.github/workflows/codeql.yml.disabled +++ /dev/null @@ -1,37 +0,0 @@ -name: "CodeQL" - -on: - push: - branches: [ main ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ main ] - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'java' ] - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/README.adoc b/README.adoc index af04f27f9..cba8d6035 100644 --- a/README.adoc +++ b/README.adoc @@ -22,9 +22,8 @@ Java Edition required. FastAsyncWorldEdit is compatible with Bukkit, Spigot and * link:https://discord.gg/intellectualsites[Discord] * link:https://intellectualsites.github.io/fastasyncworldedit-documentation/[Wiki] * link:https://github.com/IntellectualSites/FastAsyncWorldEdit/issues[Report Issue] +* link:https://intellectualsites.github.io/fastasyncworldedit-javadocs/[Javadocs] * link:https://intellectualsites.crowdin.com/fastasyncworldedit[Crowdin (Translations)] -* link:https://javadoc.io/doc/com.fastasyncworldedit/FastAsyncWorldEdit-Bukkit/latest/index.html[JavaDocs for the -bukkit module] -* link:https://javadoc.io/doc/com.fastasyncworldedit/FastAsyncWorldEdit-Core/latest/index.html[JavaDocs for the -core module] === Edit The Code diff --git a/buildSrc/src/main/kotlin/CommonJavaConfig.kt b/buildSrc/src/main/kotlin/CommonJavaConfig.kt index 676b3fc4a..59d31d58c 100644 --- a/buildSrc/src/main/kotlin/CommonJavaConfig.kt +++ b/buildSrc/src/main/kotlin/CommonJavaConfig.kt @@ -59,14 +59,13 @@ fun Project.applyCommonJavaConfiguration(sourcesJar: Boolean, banSlf4j: Boolean ) options.encoding = "UTF-8" links( - "https://javadoc.io/doc/com.google.code.findbugs/jsr305/latest/index.html", "https://jd.adventure.kyori.net/api/latest/", - "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/latest/index.html", + "https://logging.apache.org/log4j/2.x/log4j-api/apidocs/", "https://www.antlr.org/api/Java/", "https://docs.enginehub.org/javadoc/org.enginehub.piston/core/0.5.7/", "https://docs.enginehub.org/javadoc/org.enginehub.piston/default-impl/0.5.7/", "https://jd.papermc.io/paper/1.18/", - "https://javadoc.io/doc/com.fastasyncworldedit/FastAsyncWorldEdit-Core" // needed for other module linking + "https://intellectualsites.github.io/fastasyncworldedit-javadocs/worldedit-core/" ) } }