diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 280726ac03..41e94be811 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,3 +104,9 @@ jobs: julia --project=docs --color=yes docs/make.jl pdf env: DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + - name: Upload documentation artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: pkg-docs + path: docs/build/ diff --git a/docs/src/index.md b/docs/src/index.md index e51ffcec71..da1aa13c4f 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -4,6 +4,23 @@ Welcome to the documentation for Pkg, [Julia](https://julialang.org)'s package m The documentation covers many things, for example managing package installations, developing packages, working with package registries and more. +```@eval +import Markdown +# For Pkg, we need to determine the appropriate Julia version for the PDF +# Since Pkg docs are versioned by Julia version, we'll use a similar approach to Julia docs +julia_patch = if VERSION.prerelease == () + "v$(VERSION.major).$(VERSION.minor).$(VERSION.patch)" +elseif VERSION.prerelease[1] == "DEV" + "dev" +end +file = "Pkg.jl.pdf" +url = "https://raw.githubusercontent.com/JuliaLang/Pkg.jl/gh-pages-pdf/$(julia_patch)/$(file)" +Markdown.parse(""" +!!! note + The documentation is also available in PDF format: [$file]($url). +""") +``` + Throughout the manual the REPL interface to Pkg, the Pkg REPL mode, is used in the examples. There is also a functional API, which is preferred when not working interactively. This API is documented in the [API Reference](@ref) section.