Skip to content

Commit

Permalink
Add caching for Javadocs in GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SableRaf committed Dec 11, 2024
1 parent 7b26668 commit 91e4548
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/build-and-deploy-javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,13 @@ jobs:
- name: Add .nojekyll file
run: echo > processing4/build/javadoc/.nojekyll

- name: Upload Javadocs artifact
uses: actions/upload-pages-artifact@v3
- name: Cache Javadocs
uses: actions/cache@v4
with:
name: github-pages
path: processing4/build/javadoc
key: javadocs-${{ env.commit_sha }}
restore-keys: |
javadocs-
- name: Clean up the processing4 directory
run: |
Expand Down Expand Up @@ -120,10 +122,21 @@ jobs:
with:
fetch-depth: 0

- name: Copy Javadocs to /doc folder
- name: Restore Javadocs from cache
uses: actions/cache@v4
with:
path: doc
key: javadocs-${{ env.commit_sha }}
restore-keys: |
javadocs-
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Copy Javadocs to /doc folder
run: |
mkdir -p doc
cp -r processing4/build/javadoc/* doc/
git add doc/
Expand All @@ -132,4 +145,3 @@ jobs:
else
git commit -m "Update Javadocs"
git push
fi

0 comments on commit 91e4548

Please sign in to comment.