Skip to content

Use /run as the default for PID/UNIX-domain sockets #9

Use /run as the default for PID/UNIX-domain sockets

Use /run as the default for PID/UNIX-domain sockets #9

---
# remove PR previews once they're merged
# <https://juliadocs.github.io/Documenter.jl/dev/man/hosting/#gh-pages-Branch>
name: Doc Preview Cleanup
on:
pull_request:
types: [closed]
# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time
concurrency:
group: doc-preview-cleanup
cancel-in-progress: false
jobs:
doc-preview-cleanup:
runs-on: ubuntu-latest
permissions:
contents: write
env:
PR: ${{ github.event.number }}
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Delete preview and history + push changes
run: |
preview_dir="previews/PR${PR?}"
if [ -d "${preview_dir}" ]; then
# Delete preview directory created by this PR
git rm -rf "${preview_dir}"
# Commit the removed preview directories and truncate history
git config user.name "Documenter.jl"
git config user.email "[email protected]"
git commit -m "delete preview"
git branch gh-pages-new $(echo "squash history" | git commit-tree HEAD^{tree})
git push --force origin gh-pages-new:gh-pages
fi