From b3bf5ca84b6a03ee8caa7a76c64a92ee70cf88fd Mon Sep 17 00:00:00 2001 From: belljun3395 <195850@jnu.ac.kr> Date: Sat, 21 Dec 2024 01:40:07 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20docs=20=EC=95=A1=EC=85=98=EC=97=90?= =?UTF-8?q?=EC=84=9C=20allure=20=EB=AC=B8=EC=84=9C=20=EB=B0=B0=ED=8F=AC?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docs.yml | 60 +++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c5ff5ac3c..f8f7b2ea0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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/allure-report-action@v1.7 + 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