From 7b266680d51741c6dc455b559c380cb7c3404f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20de=20Courville?= Date: Wed, 11 Dec 2024 21:21:35 +0100 Subject: [PATCH] Add job to commit and push updated Javadocs to the repository --- .../workflows/build-and-deploy-javadoc.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/build-and-deploy-javadoc.yml b/.github/workflows/build-and-deploy-javadoc.yml index 6db12d9..c191578 100644 --- a/.github/workflows/build-and-deploy-javadoc.yml +++ b/.github/workflows/build-and-deploy-javadoc.yml @@ -110,3 +110,26 @@ jobs: - name: Echo the output page URL run: echo "Your site is live at ${{ steps.deployment.outputs.page_url }}" + + commit-javadoc: + needs: build-javadoc + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Copy Javadocs to /doc folder + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + mkdir -p doc + cp -r processing4/build/javadoc/* doc/ + git add doc/ + if git diff-index --quiet HEAD; then + echo "No changes to commit" + else + git commit -m "Update Javadocs" + git push + fi