Skip to content

Commit

Permalink
feat: dokka 문서화 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
belljun3395 committed Dec 5, 2024
1 parent e4efaa9 commit 2a23ea3
Show file tree
Hide file tree
Showing 2 changed files with 50 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: Build and Publish Dokka Documentation

on:
pull_request:
branches: [ "main", "dev" ]
workflow_dispatch:

permissions: write-all

jobs:
dokka:
runs-on: ubuntu-latest
steps:
# 1. Checkout the code
- uses: actions/checkout@v4

# 2. Set up JDK
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17

# 3. Run dokkaHtmlMultiModule
- name: Generate Dokka Documentation
run: ./gradlew dokkaHtmlMultiModule

# 4. Checkout gh-pages branch to publish documentation
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages # Use the `gh-pages` branch
path: gh-pages # Specify the path where `gh-pages` branch will be checked out

# 5. Copy generated documentation to gh-pages directory
- name: Copy Dokka Documentation
run: |
rm -rf gh-pages/* # Clear existing files
cp -R build/dokka/htmlPartial/* gh-pages/ # Copy the newly generated documentation
# 6. Publish documentation to GitHub Pages
- name: Publish Documentation
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: gh-pages
3 changes: 3 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ plugins {
id("org.asciidoctor.jvm.convert") version DependencyVersion.ASCIIDOCTOR
id("com.epages.restdocs-api-spec") version DependencyVersion.EPAGES_REST_DOCS_API_SPEC
id("org.hidetake.swagger.generator") version DependencyVersion.SWAGGER_GENERATOR

id("org.jetbrains.dokka") version "1.9.20"
}

java.sourceCompatibility = JavaVersion.VERSION_18
Expand Down Expand Up @@ -71,6 +73,7 @@ subprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
apply(plugin = "org.hidetake.swagger.generator")
apply(plugin = "org.jooq.jooq-codegen-gradle")
apply(plugin = "org.jetbrains.dokka")

/**
* https://kotlinlang.org/docs/reference/compiler-plugins.html#spring-support
Expand Down

0 comments on commit 2a23ea3

Please sign in to comment.