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