Skip to content

Commit

Permalink
chore: publish docs artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
ttypic committed Dec 10, 2024
1 parent 03c4df5 commit 4d32877
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: API Reference
on:
pull_request:
push:
branches:
- main
tags:
- '*'

jobs:
build:
if: github.actor != 'dependabot[bot]' || github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
deployments: write
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Set up Gradle
uses: gradle/gradle-build-action@v2

- name: Build Documentation
run: ./gradlew dokkaHtml

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
role-to-assume: arn:aws:iam::${{ secrets.ABLY_AWS_ACCOUNT_ID_SDK }}:role/ably-sdk-builds-ably-chat-kotlin
role-session-name: "${{ github.run_id }}-${{ github.run_number }}"

- name: Upload Documentation
uses: ably/sdk-upload-action@v2
with:
sourcePath: chat-android/build/dokka/html
githubToken: ${{ secrets.GITHUB_TOKEN }}
artifactName: dokka
1 change: 1 addition & 0 deletions chat-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {
alias(libs.plugins.build.config)
alias(libs.plugins.kover)
alias(libs.plugins.maven.publish)
alias(libs.plugins.dokka)
}

val version = property("VERSION_NAME")
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "
build-config = { id = "com.github.gmazzo.buildconfig", version.ref = "build-config" }
kover = { id = "org.jetbrains.kotlinx.kover", version = "0.9.0-RC" }
maven-publish = { id = "com.vanniktech.maven.publish", version = "0.30.0" }
dokka = { id = "org.jetbrains.dokka", version = "1.9.20" }

0 comments on commit 4d32877

Please sign in to comment.