Skip to content

Commit

Permalink
[docs] Delete preview subdir only if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Mar 22, 2024
1 parent ab33902 commit 1f9c0dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ jobs:
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
COMMIT_MESSAGE="Update docs preview from ${{ github.sha }}"
# Only delete files in the preview subdir, if any
git rm -rf "${PREVIEW_SUBDIR}"
if [[ -d "${PREVIEW_SUBDIR}" ]]; then
git rm -rf "${PREVIEW_SUBDIR}"
fi
else
COMMIT_MESSAGE="Update docs from ${{ github.sha }}"
for file in $(git ls-files); do
Expand Down

0 comments on commit 1f9c0dc

Please sign in to comment.