Skip to content

Commit 7b26668

Browse files
committed
Add job to commit and push updated Javadocs to the repository
1 parent 8ae3bc0 commit 7b26668

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/build-and-deploy-javadoc.yml

+23
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,26 @@ jobs:
110110

111111
- name: Echo the output page URL
112112
run: echo "Your site is live at ${{ steps.deployment.outputs.page_url }}"
113+
114+
commit-javadoc:
115+
needs: build-javadoc
116+
runs-on: ubuntu-latest
117+
steps:
118+
- name: Checkout repository
119+
uses: actions/checkout@v3
120+
with:
121+
fetch-depth: 0
122+
123+
- name: Copy Javadocs to /doc folder
124+
run: |
125+
git config --global user.name "github-actions[bot]"
126+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
127+
mkdir -p doc
128+
cp -r processing4/build/javadoc/* doc/
129+
git add doc/
130+
if git diff-index --quiet HEAD; then
131+
echo "No changes to commit"
132+
else
133+
git commit -m "Update Javadocs"
134+
git push
135+
fi

0 commit comments

Comments
 (0)