Skip to content

Added highlight and bookmark feature in notes #743 #68

Added highlight and bookmark feature in notes #743

Added highlight and bookmark feature in notes #743 #68

name: Clean up PR Preview
on:
pull_request:
types: [closed]
branches:
- main
jobs:
cleanup-preview:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
fetch-depth: 1
- name: Remove PR preview directory
run: |
if [ -d "pr-preview/pr-${{ github.event.pull_request.number }}" ]; then
rm -rf pr-preview/pr-${{ github.event.pull_request.number }}
echo "Removed preview for PR #${{ github.event.pull_request.number }}"
else
echo "No preview directory found for PR #${{ github.event.pull_request.number }}"
fi
- name: Commit cleanup
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Clean up preview for PR #${{ github.event.pull_request.number }}"
git push
else
echo "No changes to commit"
fi