Skip to content

Commit

Permalink
🐛 fix doc preview
Browse files Browse the repository at this point in the history
  • Loading branch information
camilamacedo86 committed Aug 15, 2023
1 parent 32720bc commit c9f3544
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
8 changes: 7 additions & 1 deletion docs/book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ src = "src"
title = "The Kubebuilder Book"

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

[preprocessor.markerdocs]
command = "./markerdocs.sh"

[context.environment]
environment = { GO_VERSION = "1.20" }

[context.deploy-preview.environment]
environment = { GO_VERSION = "1.20" }

12 changes: 8 additions & 4 deletions docs/book/install-and-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ THIS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)

cd "$THIS_DIR"

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

Expand Down Expand Up @@ -60,14 +63,15 @@ esac

# grab mdbook
# we hardcode linux/amd64 since rust uses a different naming scheme and it's a pain to tran
echo "downloading mdBook-v0.4.21-${arch}-${target}.${ext}"
echo "downloading mdBook-v0.4.34-${arch}-${target}.${ext}"
set -x
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}
curl -sL -o /tmp/mdbook.${ext} https://github.com/rust-lang/mdBook/releases/download/v0.4.34/mdBook-v0.4.34-${arch}-${target}.${ext}
${cmd} /tmp/mdbook.${ext}
chmod +x /tmp/mdbook

echo "grabbing the latest released controller-gen"
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.12.0
go version
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.12.1

# make sure we add the go bin directory to our path
gobin=$(go env GOBIN)
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build]
base = "docs/book"
command = "./install-and-build.sh"
command = "GO_VERSION=1.20 ./install-and-build.sh"
publish = "docs/book/book"
functions = "docs/book/functions"

Expand Down

0 comments on commit c9f3544

Please sign in to comment.