From 24832cd6cfa56500bd5f764677db6dee1b372ddc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 Aug 2025 22:22:45 +0000 Subject: [PATCH 1/2] Initial plan From 8209df53848777860d097fc9b0d4f2fcf3101e4a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 Aug 2025 22:27:26 +0000 Subject: [PATCH 2/2] Add DoodleBUGS PR Preview cleanup workflow Co-authored-by: yebai <3279477+yebai@users.noreply.github.com> --- .../workflows/DoodleBUGSPreviewCleanup.yml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/DoodleBUGSPreviewCleanup.yml diff --git a/.github/workflows/DoodleBUGSPreviewCleanup.yml b/.github/workflows/DoodleBUGSPreviewCleanup.yml new file mode 100644 index 000000000..f248490b0 --- /dev/null +++ b/.github/workflows/DoodleBUGSPreviewCleanup.yml @@ -0,0 +1,36 @@ +name: DoodleBUGS PR Preview Cleanup + +on: + pull_request: + types: [closed] + paths: + - 'DoodleBUGS/**' + - '.github/workflows/DoodleBUGSpreview.yml' + - '.github/workflows/DoodleBUGSPreviewCleanup.yml' + +permissions: + contents: write + +jobs: + cleanup: + runs-on: ubuntu-latest + steps: + - name: Checkout gh-pages branch + uses: actions/checkout@v4 + with: + ref: gh-pages + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Delete DoodleBUGS preview and push changes + run: | + if [ -d "DoodleBUGS/pr-previews/$PRNUM" ]; then + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git rm -rf "DoodleBUGS/pr-previews/$PRNUM" + git commit -m "DoodleBUGS: Delete preview for PR $PRNUM" + git push origin gh-pages + else + echo "No DoodleBUGS preview found for PR $PRNUM" + fi + env: + PRNUM: ${{ github.event.number }} \ No newline at end of file