From bdd32d7c1ba9fc5879d4b82618f7e6d32cdda389 Mon Sep 17 00:00:00 2001 From: wojciechowskiradek Date: Mon, 2 Dec 2024 13:11:34 +0100 Subject: [PATCH] Feature: autogenerated docs update by PR (#364) --- .github/workflows/api_reference_refresh.yml | 32 ++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/api_reference_refresh.yml b/.github/workflows/api_reference_refresh.yml index ed17fc80..f80d1d29 100644 --- a/.github/workflows/api_reference_refresh.yml +++ b/.github/workflows/api_reference_refresh.yml @@ -47,4 +47,34 @@ jobs: run: echo "${{ steps.package.outputs.content }}" - name: Generate documentation with Dokka - run: ./gradlew dokkaHtml \ No newline at end of file + run: ./gradlew dokkaHtml + + - name: Setup Git user (GitHub Actions bot) + run: | + git config user.name TelnyxIntegrations + git config user.email integrations@telnyx.com + + - name: Configure git push.autoSetupRemote + run: | + git config push.autoSetupRemote true + + - name: Create new branch name for docs + run: | + BRANCH_NAME="docs/update-$(date +'%Y%m%d%H%M%S')" + echo "branch_name=$BRANCH_NAME" >> $GITHUB_ENV + + - name: Create Pull Request using GitHub Actions bot + uses: peter-evans/create-pull-request@v7 + with: + add-paths: | + docs/ + token: ${{ secrets.GITHUB_TOKEN }} + committer: TelnyxIntegrations + base: main + branch: ${{ env.branch_name }} + delete-branch: true + title: '[docs] Update generated HTML documentation' + commit-message: "docs: Generated full documentation" + body: "This PR updates the full documentation generated by dokkaHtml." + labels: "documentation, auto-generated" + draft: false \ No newline at end of file