From 3658070c2db71d9fd7a7aae7a487fdb8ae0caa33 Mon Sep 17 00:00:00 2001 From: Sean Holung Date: Fri, 6 Oct 2023 14:43:11 -0400 Subject: [PATCH] build all api docs on pull request --- scripts/ci/build.sh | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index 7f12ccdc41..4f0f8e3400 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -29,36 +29,20 @@ go build -o "${GOPATH}/bin/resourcedocsgen" . popd REGISTRY_COMMIT="$(git_sha_short)" +printf "Generating API docs from registry commit %s...\n\n" "${REGISTRY_COMMIT}" +resourcedocsgen docs registry --commitSha "${REGISTRY_COMMIT}" \ + --baseDocsOutDir "themes/default/content/registry/packages" \ + --basePackageTreeJSONOutDir "themes/default/static/registry/packages/navs" \ + --logtostderr + +printf "Running Hugo...\n\n" case ${1} in preview) - PKGS=( - "aiven" - "aws" - ) - - echo "Generating API docs for ${PKGS[*]}..." - echo "" - - for PKG in "${PKGS[@]}" ; do \ - resourcedocsgen docs registry "${PKG}" \ - --commitSha "${REGISTRY_COMMIT}" \ - --baseDocsOutDir "themes/default/content/registry/packages" \ - --basePackageTreeJSONOutDir "themes/default/static/registry/packages/navs" \ - --logtostderr - done - printf "Running Hugo...\n\n" export HUGO_BASEURL="http://$(origin_bucket_prefix)-$(build_identifier).s3-website.$(aws_region).amazonaws.com" GOGC=3 hugo --minify --buildFuture --templateMetrics -e preview ;; update) - printf "Generating API docs from registry commit %s...\n\n" "${REGISTRY_COMMIT}" - resourcedocsgen docs registry --commitSha "${REGISTRY_COMMIT}" \ - --baseDocsOutDir "themes/default/content/registry/packages" \ - --basePackageTreeJSONOutDir "themes/default/static/registry/packages/navs" \ - --logtostderr - - printf "Running Hugo...\n\n" GOGC=3 hugo --minify --buildFuture --templateMetrics -e production ;; *)