Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/DocPreviewsCleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ jobs:
ref: gh-pages
- name: Delete preview and history + push changes
run: |
preview_directory=previews/PR${{ github.event.number }}
if [[ -d "${preview_directory}" ]]; then
if [[ -d previews ]]; then
git config user.name "${{github.actor}}"
git config user.email "${{github.actor_id}}+${{github.actor}}@users.noreply.github.com"
git rm -rf "${preview_directory}"
git commit -m 'Cleanup docs for PR #${{ github.event.number }}'
git rm -rf previews/
git commit -m 'Delete previews directory'
git branch gh-pages-new $(echo "Delete history" | git commit-tree HEAD^{tree})
git push --force origin gh-pages-new:gh-pages
git push --force-with-lease origin gh-pages-new:gh-pages
fi