Skip to content

Updated doc

Updated doc #1

name: Remove Preview
on:
pull_request:
types: [closed]
permissions:
contents: write
concurrency:
group: eeid-doc-preview-cleanup-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
remove-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub Pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
fetch-depth: 1
- name: Remove preview directory
run: |
rm -rf "previews/pr-${{ github.event.pull_request.number }}"
- name: Commit preview removal
run: |
if git diff --quiet; then
echo "No preview directory to remove."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "Remove docs preview for PR #${{ github.event.pull_request.number }}"
git push