diff --git a/.github/workflows/publish-kdoc.yml b/.github/workflows/publish-kdoc.yml new file mode 100644 index 00000000..cb7c827f --- /dev/null +++ b/.github/workflows/publish-kdoc.yml @@ -0,0 +1,30 @@ +on: workflow_dispatch + +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