From c410d82c28bad5ffd0dd5cb30515d74146c2cb00 Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sun, 7 Jun 2026 06:52:45 -0400 Subject: [PATCH] Migrate docs preview cleanup to centralized SciML caller Replace the hand-rolled inline DocsPreviewCleanup.yml (which checked out gh-pages and manually deleted the previews/PR directory) with a thin caller of SciML/.github/.github/workflows/docs-preview-cleanup.yml@v1. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/DocPreviewCleanup.yml | 10 +++++++++ .github/workflows/DocsPreviewCleanup.yml | 26 ------------------------ 2 files changed, 10 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/DocPreviewCleanup.yml delete mode 100644 .github/workflows/DocsPreviewCleanup.yml diff --git a/.github/workflows/DocPreviewCleanup.yml b/.github/workflows/DocPreviewCleanup.yml new file mode 100644 index 0000000..960a549 --- /dev/null +++ b/.github/workflows/DocPreviewCleanup.yml @@ -0,0 +1,10 @@ +name: "Doc Preview Cleanup" +on: + pull_request: + types: [closed] +permissions: + contents: write +jobs: + cleanup: + uses: "SciML/.github/.github/workflows/docs-preview-cleanup.yml@v1" + secrets: "inherit" diff --git a/.github/workflows/DocsPreviewCleanup.yml b/.github/workflows/DocsPreviewCleanup.yml deleted file mode 100644 index 6c1fa15..0000000 --- a/.github/workflows/DocsPreviewCleanup.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: DocsPreviewCleanup - -on: - pull_request: - types: [closed] - -jobs: - cleanup: - runs-on: ubuntu-latest - steps: - - name: Checkout gh-pages branch - uses: actions/checkout@v5 - with: - ref: gh-pages - - name: Delete preview and history + push changes - run: | - if [ -d "previews/PR$PRNUM" ]; then - git config user.name "Documenter.jl" - git config user.email "documenter@juliadocs.github.io" - git rm -rf "previews/PR$PRNUM" - git commit -m "delete preview" - git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) - git push --force origin gh-pages-new:gh-pages - fi - env: - PRNUM: ${{ github.event.number }} \ No newline at end of file