diff --git a/.github/workflows/DocCleanup.yml b/.github/workflows/DocCleanup.yml deleted file mode 100644 index 365d56fa..00000000 --- a/.github/workflows/DocCleanup.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Doc Preview Cleanup - -on: - pull_request: - types: [closed] - -jobs: - doc-preview-cleanup: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Checkout gh-pages branch - uses: actions/checkout@v3 - 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 diff --git a/.github/workflows/DocPreviewCleanup.yml b/.github/workflows/DocPreviewCleanup.yml new file mode 100644 index 00000000..960a5492 --- /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"