Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/DocCleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Doc Cleanup
on:
# runs on the 1st day of every month at 03:00 UTC
schedule:
- cron: '0 3 1 * *'
workflow_dispatch:
permissions:
contents: write
jobs:
Comment thread
eliascarv marked this conversation as resolved.
doc-cleanup:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v7
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 --ignore-unmatch v[0-9]*.[0-9]*
git checkout HEAD -- "$keep"
Comment on lines +19 to +23

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juliohm, this suggestion isn't strictly necessary, since the stable symlink will always exist in the documentation generated by Documenter.jl.

if git diff --cached --quiet; then
echo "No old docs to delete"
else
git commit -m "Keep latest docs only"
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
git push --force origin gh-pages-new:gh-pages
fi
7 changes: 6 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@ makedocs(;
]
)

deploydocs(; repo="github.com/JuliaML/TableTransforms.jl", devbranch="master", push_preview=true)
deploydocs(;
repo="github.com/JuliaML/TableTransforms.jl",
versions=["stable" => "v^", "dev" => "dev"],
devbranch="master",
push_preview=true
)
Loading