diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 567c46e..360c09e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,6 @@ name: build on: - # Trigger the workflow on push or pull request, push: branches: - main @@ -59,4 +58,4 @@ jobs: uses: codecov/codecov-action@v4.0.1 with: token: ${{ secrets.CODECOV_TOKEN }} - slug: Bram--/bggclient + slug: Bram--/bggclient diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..b93b09b --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,25 @@ +name: Build and Deploy +on: + push: + branches: + - main + - release + workflow_dispatch: + +permissions: + contents: write + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v4 + + - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. + run: ./gradlew dokkaHtml + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: build/dokka/html \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 8f4a981..eedb023 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,9 +3,10 @@ plugins { `java-library` `maven-publish` signing - alias(libs.plugins.org.jetbrains.kotlin.jvm) + alias(libs.plugins.com.gradleup.nmcp) alias(libs.plugins.ktfmt.gradle) - id("com.gradleup.nmcp").version("0.0.4") + alias(libs.plugins.org.jetbrains.dokka) + alias(libs.plugins.org.jetbrains.kotlin.jvm) } java { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 42696ae..43e5152 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,10 +1,12 @@ [versions] +com-gradleup-nmcp = "0.0.4" jackson = "2.16.1" javax-xml-stream = "1.0-2" junit5 = "5.8.1" kermit = "2.0.3" ktfmt-gradle = "0.15.1" ktor = "2.3.8" +org-jetbrains-dokka = "1.9.10" org-jetbrains-kotlin-jvm = "1.9.22" org-jetbrains-kotlin-jdk8 = "1.8.0" serialization = "1.6.3" @@ -31,4 +33,6 @@ truth = { module = "com.google.truth:truth", version.ref = "truth" } [plugins] org-jetbrains-kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "org-jetbrains-kotlin-jvm" } ktfmt-gradle = { id = "com.ncorti.ktfmt.gradle", version.ref = "ktfmt-gradle" } +com-gradleup-nmcp = { id = "com.gradleup.nmcp", version.ref = "com-gradleup-nmcp" } +org-jetbrains-dokka = { id = "org.jetbrains.dokka", version.ref = "org-jetbrains-dokka" }