Skip to content

Commit

Permalink
Publish dokka docs to Github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
GSculerlor committed Feb 29, 2024
1 parent 6dbcd3c commit 3b96625
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
name: Build CI

on:
push:
branches: [ master ]
pull_request:
branches: [ '*' ]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3.5.1
with:
Expand All @@ -28,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3.5.1
with:
Expand All @@ -38,12 +36,11 @@ jobs:
run: chmod +x ./gradlew
- name: API check
run: ./gradlew apiCheck --stacktrace

build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4
- name: set up JDK
uses: actions/setup-java@v3.5.1
with:
Expand All @@ -64,3 +61,26 @@ jobs:
run: ./gradlew :bindable:build --stacktrace
- name: Unit tests
run: ./gradlew :bindable:test --stacktrace
publish_docs:
name: Publish docs
runs-on: ubuntu-latest
needs: build
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3.5.1
with:
java-version: 17
distribution: zulu
- name: Make Gradle executable
run: chmod +x ./gradlew
- name: Generate docs
run: ./gradlew dokkaHtml --stacktrace
- name: Upload artifact
uses: actions/upload-pages-artifact@v3.0.1
with:
path: ${{ github.workspace }}/bindable/build/dokka/html
- name: Deploy pages
id: deployment
uses: actions/deploy-pages@v4.0.4
1 change: 1 addition & 0 deletions bindable/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlinter)
alias(libs.plugins.kotlinx.binary.compatibility.validator)
alias(libs.plugins.dokka)
id("kotlinx-atomicfu")
id("maven-publish")
}
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
alias(libs.plugins.kotlin.multiplatform).apply(false)
alias(libs.plugins.kotlinter).apply(false)
alias(libs.plugins.kotlinx.binary.compatibility.validator).apply(false)
alias(libs.plugins.dokka).apply(false)
}

buildscript {
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[versions]
agp = "8.2.2"
dokka = "1.9.10"
kotlin = "1.9.21"
kotlinter = "4.1.0"
kotlinx-atomicfu = "0.23.2"
Expand All @@ -10,6 +11,7 @@ kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu-gradle-plugin", ve

[plugins]
android-library = { id = "com.android.library", version.ref = "agp" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinter = { id = "org.jmailen.kotlinter", version.ref = "kotlinter" }
kotlinx-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinx-binary-compatibility-validator" }

0 comments on commit 3b96625

Please sign in to comment.