From bb4597d141b096db20a851f37c9a983c46e7a078 Mon Sep 17 00:00:00 2001 From: Bram-- Date: Thu, 7 Mar 2024 15:28:08 +0000 Subject: [PATCH] Create dokka.yml --- .github/workflows/dokka.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/dokka.yml diff --git a/.github/workflows/dokka.yml b/.github/workflows/dokka.yml new file mode 100644 index 0000000..1d40bf5 --- /dev/null +++ b/.github/workflows/dokka.yml @@ -0,0 +1,41 @@ +name: Docs + +on: + push: + branches: + - main + - release + +jobs: + build: + name: docs + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + id-token: write + pages: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + distribution: 'corretto' + java-version: '17' + - name: Run build + run: | + ./gradlew clean build + + - name: Generate API documentation + if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }} + run: | + ./gradlew dokkaHtml + + - name: Deploy API documentation to Github Pages + if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }} + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: gh-pages + folder: build/dokka/html + target-folder: docs