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