Skip to content

Commit

Permalink
docs/ci: fix docs being installed to nixvim/nixvim/<subdir>
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
MattSturgeon committed Nov 18, 2024
1 parent 2bc8dc8 commit 8524447
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit 8524447

Please sign in to comment.