diff --git a/src/Documenter.jl b/src/Documenter.jl index 1ef12df3035..8a80ddf3306 100644 --- a/src/Documenter.jl +++ b/src/Documenter.jl @@ -284,6 +284,10 @@ deploydocs( ) ``` +When building the docs for a tag (i.e. a release) the documentation is deployed to +a directory with the tag name (i.e. `vX.Y.Z`) and to the `stable` directory. +Otherwise the docs are deployed to the `latest` directory. + # Keywords **`root`** has the same purpose as the `root` keyword for [`makedocs`](@ref). @@ -463,6 +467,9 @@ end ) Handles pushing changes to the remote documentation branch. +When `tag` is empty the docs are deployed to the `latest` directory, +and when building docs for a tag they are deployed to a `vX.Y.Z` directory, +and also to the `stable` directory. """ function git_push( root, temp, repo; @@ -529,10 +536,6 @@ function git_push( end gitrm_copy(target_dir, tagged_dir) Writers.HTMLWriter.generate_siteinfo_file(tagged_dir, tag) - # Build a `release-*.*` folder as well - release = "release-$(version.major).$(version.minor)" - gitrm_copy(target_dir, joinpath(dirname, release)) - Writers.HTMLWriter.generate_siteinfo_file(joinpath(dirname, release), release) end # Create the versions.js file containing a list of all docs diff --git a/src/Writers/HTMLWriter.jl b/src/Writers/HTMLWriter.jl index 381d04eeb01..b2e9c470342 100644 --- a/src/Writers/HTMLWriter.jl +++ b/src/Writers/HTMLWriter.jl @@ -488,7 +488,7 @@ function generate_version_file(dir::AbstractString) end open(joinpath(dir, "versions.js"), "w") do buf println(buf, "var DOC_VERSIONS = [") - for group in (named_folders, release_folders, tag_folders) + for group in (named_folders, tag_folders, release_folders) for folder in sort!(group, rev = true) println(buf, " \"", folder, "\",") end