Skip to content

Commit c9f3544

Browse files
🐛 fix doc preview
1 parent 32720bc commit c9f3544

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

docs/book/book.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ src = "src"
55
title = "The Kubebuilder Book"
66

77
[output.html]
8-
google-analytics = "UA-119864590-1"
98
curly-quotes = true
109
additional-css = ["theme/css/markers.css", "theme/css/custom.css", "theme/css/version-dropdown.css"]
1110
git-repository-url = "https://github.com/kubernetes-sigs/kubebuilder"
@@ -16,3 +15,10 @@ command = "./litgo.sh"
1615

1716
[preprocessor.markerdocs]
1817
command = "./markerdocs.sh"
18+
19+
[context.environment]
20+
environment = { GO_VERSION = "1.20" }
21+
22+
[context.deploy-preview.environment]
23+
environment = { GO_VERSION = "1.20" }
24+

docs/book/install-and-build.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ THIS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
2323

2424
cd "$THIS_DIR"
2525

26-
[[ -n "$(command -v gimme)" ]] && eval "$(gimme stable)"
26+
if [[ -n "$(command -v gimme)" ]]; then
27+
GO_VERSION=${GO_VERSION:-stable} # Use the provided GO_VERSION or default to 'stable'
28+
eval "$(gimme $GO_VERSION)"
29+
fi
2730
echo go version
2831
GOBIN=$THIS_DIR/functions go install ./...
2932

@@ -60,14 +63,15 @@ esac
6063

6164
# grab mdbook
6265
# we hardcode linux/amd64 since rust uses a different naming scheme and it's a pain to tran
63-
echo "downloading mdBook-v0.4.21-${arch}-${target}.${ext}"
66+
echo "downloading mdBook-v0.4.34-${arch}-${target}.${ext}"
6467
set -x
65-
curl -sL -o /tmp/mdbook.${ext} https://github.com/rust-lang-nursery/mdBook/releases/download/v0.4.2/mdBook-v0.4.2-${arch}-${target}.${ext}
68+
curl -sL -o /tmp/mdbook.${ext} https://github.com/rust-lang/mdBook/releases/download/v0.4.34/mdBook-v0.4.34-${arch}-${target}.${ext}
6669
${cmd} /tmp/mdbook.${ext}
6770
chmod +x /tmp/mdbook
6871

6972
echo "grabbing the latest released controller-gen"
70-
go install sigs.k8s.io/controller-tools/cmd/[email protected]
73+
go version
74+
go install sigs.k8s.io/controller-tools/cmd/[email protected]
7175

7276
# make sure we add the go bin directory to our path
7377
gobin=$(go env GOBIN)

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build]
22
base = "docs/book"
3-
command = "./install-and-build.sh"
3+
command = "GO_VERSION=1.20 ./install-and-build.sh"
44
publish = "docs/book/book"
55
functions = "docs/book/functions"
66

0 commit comments

Comments
 (0)