From 167842cb7b1f2bf8121bf97a554b3e08138d1e06 Mon Sep 17 00:00:00 2001 From: Evan Masseau <> Date: Thu, 25 Jan 2024 20:54:19 -0500 Subject: [PATCH] Attempt a doc generator action --- .github/workflows/doc-bot.yml | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/doc-bot.yml diff --git a/.github/workflows/doc-bot.yml b/.github/workflows/doc-bot.yml new file mode 100644 index 000000000..e6d226504 --- /dev/null +++ b/.github/workflows/doc-bot.yml @@ -0,0 +1,45 @@ +name: Generate release docs and commit to documentation branch (which is published to github pages) + +on: + release: + types: [released] + push: + branches: + - ecm/doc-bot + +jobs: + dokka: + runs-on: ubuntu-22.04 + env: + GH_TOKEN: ${{ github.token }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: documentation + + - name: Git config + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git fetch origin + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 17 + + - name: Update documentation branch from master + run: | + git merge origin/master -m "Merge changes from master for ${{ github.sha }}" + + - name: Generate Dokka documentation + run: ./gradlew dokkaHtmlMultiModule + + - name: Commit and push documentation + run: | + git add . + git commit -m "Update documentation for release version ${{ github.sha }}" + git push -u origin documentation