From 73ebb3f2b424ddf16d2effba88c429c27193f6d4 Mon Sep 17 00:00:00 2001 From: Jake Wharton Date: Wed, 30 Oct 2024 12:17:46 -0400 Subject: [PATCH] Deploy snapshot and release docs --- .github/workflows/build.yaml | 12 +++++++++++- .github/workflows/release.yaml | 11 ++++++++++- gradle.properties | 1 + 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2961dd3..686782d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,10 +23,20 @@ jobs: distribution: 'zulu' java-version: 21 - - run: ./gradlew build + - run: ./gradlew build :burst:dokkaHtml - run: ./gradlew publish if: ${{ github.ref == 'refs/heads/main' && github.repository == 'cashapp/burst' }} env: ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} + + - name: Deploy docs to website + if: ${{ github.ref == 'refs/heads/main' && github.repository == 'cashapp/burst' }} + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: site + FOLDER: burst/build/dokka/html + TARGET_FOLDER: docs/latest/ + CLEAN: true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 704d84f..12e6dde 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: distribution: 'zulu' java-version: 21 - - run: ./gradlew publish + - run: ./gradlew publish :burst:dokkaHtml env: ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} @@ -36,3 +36,12 @@ jobs: run: gh release create ${{ github.ref_name }} --notes-file RELEASE_NOTES.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Deploy docs to website + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: site + FOLDER: burst/build/dokka/html + TARGET_FOLDER: docs/2.x/ + CLEAN: true diff --git a/gradle.properties b/gradle.properties index d88a6be..cf33174 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,7 @@ org.gradle.caching=true org.gradle.jvmargs=-Xmx1024m -Dfile.encoding=UTF-8 org.gradle.parallel=true +# HEY! If you change the major version here be sure to update release.yaml doc target folder! VERSION_NAME=2.0.0-SNAPSHOT systemProp.org.gradle.internal.http.socketTimeout=120000