docs/ci: fix docs being installed to nixvim/nixvim/<subdir>

We don't need to specify `/nixvim/` as part of our install path as that
is where gh-pages uploads to by default.

Rather, we only need to specify the full `/nixvim/foo/` in the base-href
and the install path should just be `/foo`.
This commit is contained in:
Matt Sturgeon 2024-11-18 22:12:48 +00:00
parent 2bc8dc86a0
commit 8524447554
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -54,8 +54,9 @@ jobs:
# 2: dest-dir (relative to /nixvim/)
build() {
flake="github:${repo}${1:+/$1}"
baseHref="/${repoName}/${2:+$2/}"
destDir="${out}${baseHref}"
dir="${2:+/$2}"
baseHref="/${repoName}${dir}/"
installDir="${out}${dir}"
# Build docs for the given flake ref, overriding baseHref in the derivation args
nix build --impure --expr '(builtins.getFlake "'"$flake"'").outputs.packages.${builtins.currentSystem}.docs.override {
@ -64,7 +65,7 @@ jobs:
# Copy the result to the dest-dir
mkdir -p "$destDir"
cp -r result/share/doc/* "$destDir"
cp -r result/share/doc/* "$installDir"
}
# Install main-branch docs at the top-level