-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: docs 액션에서 allure 문서 배포하도록 수정
- Loading branch information
1 parent
db94f22
commit b3bf5ca
Showing
1 changed file
with
34 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build and Publish Dokka Documentation | ||
name: Build and Publish Allure Documentation | ||
|
||
on: | ||
pull_request: | ||
|
@@ -8,40 +8,48 @@ on: | |
permissions: write-all | ||
|
||
jobs: | ||
dokka: | ||
docs: | ||
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 | ||
- name: Set up JDK 18 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: zulu | ||
java-version: 17 | ||
java-version: '18' | ||
distribution: 'temurin' | ||
|
||
# 3. Run dokkaHtmlMultiModule | ||
- name: Generate Dokka Documentation | ||
run: ./gradlew dokkaHtmlMultiModule | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
# 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 | ||
- name: Jooq Code Generation | ||
run: | | ||
rm -rf gh-pages/* # Clear existing files | ||
cp -R build/dokka/htmlMultiModule/* gh-pages/ # Copy the newly generated documentation | ||
./gradlew jooqCodegenAll | ||
- name: Generate Allure Results | ||
run: ./gradlew api:test | ||
|
||
# 6. Publish documentation to GitHub Pages | ||
- name: Publish Documentation | ||
uses: peaceiris/actions-gh-pages@v4 | ||
- name: Load test report history | ||
uses: actions/checkout@v3 | ||
if: always() | ||
continue-on-error: true | ||
with: | ||
ref: gh-pages | ||
path: gh-pages | ||
|
||
- name: Build test report | ||
uses: simple-elf/[email protected] | ||
if: always() | ||
with: | ||
gh_pages: gh-pages | ||
allure_history: allure-history | ||
allure_results: build/allure-results | ||
subfolder: api | ||
|
||
- name: Publish test report | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: always() | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gh-pages | ||
publish_dir: gh-pages | ||
publish_dir: allure-history |