From a532c318b819e3a8d96579932b8fec89a12e70ff Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Mon, 20 Nov 2023 23:53:01 -0800 Subject: [PATCH 1/2] GitHub actions workflow for the kdoc. --- .github/workflows/publish-kdoc.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/publish-kdoc.yml diff --git a/.github/workflows/publish-kdoc.yml b/.github/workflows/publish-kdoc.yml new file mode 100644 index 00000000..1f030f5d --- /dev/null +++ b/.github/workflows/publish-kdoc.yml @@ -0,0 +1,30 @@ +on: [push] + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + deployments: write + name: Publish to Cloudflare Pages + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install JDK 17 + uses: actions/setup-java@v3 + with: + distribution: "temurin" + java-version: 17 + - name: Gradle caching + uses: gradle/gradle-build-action@v2 + with: + gradle-home-cache-cleanup: true + - name: Build + run: ./gradlew :dokkatooGeneratePublicationHtml + - name: Publish to Cloudflare Pages + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: 0a95e814ccf2b6a95d2dc3bea0a4a2b4 + projectName: selfie-kdoc + directory: build/dokka/html From d5e323f92115339b0b1939ab760b791f859caa84 Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Mon, 20 Nov 2023 23:58:30 -0800 Subject: [PATCH 2/2] Only publish kdoc as part of a publish. --- .github/workflows/publish-kdoc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-kdoc.yml b/.github/workflows/publish-kdoc.yml index 1f030f5d..cb7c827f 100644 --- a/.github/workflows/publish-kdoc.yml +++ b/.github/workflows/publish-kdoc.yml @@ -1,4 +1,4 @@ -on: [push] +on: workflow_dispatch jobs: publish: