Skip to content

Doc Cleanup

Doc Cleanup #3

Workflow file for this run

name: Doc Cleanup
on:
push:
branches:
- gh-pages
workflow_dispatch:
jobs:
doc-cleanup:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Delete old docs
run: |
keep=$(readlink stable)
git config user.name "Documenter.jl"
git config user.email "documenter@juliadocs.github.io"
git rm -rf v[0-9]*.[0-9]* && git checkout HEAD -- $keep
if git commit -m "keep latest docs only" ; then
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
git push --force origin gh-pages-new:gh-pages
fi