From 244ecd17cbe17c8d7741872ff86eeeb9f2a4bbdd Mon Sep 17 00:00:00 2001 From: Alex Lourie Date: Thu, 5 Feb 2026 23:40:23 +1030 Subject: [PATCH 1/3] Handle the spec files We want to version the spec files if they're present. This change updates the build.sh script to place the spec files into the proper location for the site build. Additional actions are required to actually version the spec files, that will be done in `docusaurus-action` Signed-off-by: Alex Lourie --- pipelines/Docusaurus/Dockerfile | 4 +++- pipelines/Docusaurus/templates/build.sh | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pipelines/Docusaurus/Dockerfile b/pipelines/Docusaurus/Dockerfile index ac3abd9..b5181f4 100644 --- a/pipelines/Docusaurus/Dockerfile +++ b/pipelines/Docusaurus/Dockerfile @@ -8,10 +8,12 @@ RUN apk add --no-cache \ make \ tar \ jq + +# copy the templates first, as they rarily change +COPY ./node_modules /node_modules RUN mkdir /templates COPY ./templates /templates -COPY ./node_modules /node_modules EXPOSE 3000 diff --git a/pipelines/Docusaurus/templates/build.sh b/pipelines/Docusaurus/templates/build.sh index 6ed06f6..81ed33d 100755 --- a/pipelines/Docusaurus/templates/build.sh +++ b/pipelines/Docusaurus/templates/build.sh @@ -99,6 +99,18 @@ function configure_site() { # back to the archive folder with link dereference. We'll do this in docusaurus-action. That's why we don't use links here. cp -r ../archive/* . + # we're in site-config, so handle the spec files + if [ -d static/spec ]; then + # preserve the next spec + mv static/spec/next versioned_spec + rm -rf static/spec/* + mv versioned_spec/* static/spec/ + else + # specs are not needed + echo "Spec files not needed" + rm -rf versioned_spec + fi + # link the current docs, it works fine ln -s ../docs . From 1a36b2b9164352580e6724ea6b10c161e1db9eef Mon Sep 17 00:00:00 2001 From: Alex Lourie Date: Fri, 6 Feb 2026 14:20:28 +1030 Subject: [PATCH 2/3] Simplify spec versioning Signed-off-by: Alex Lourie --- pipelines/Docusaurus/templates/build.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pipelines/Docusaurus/templates/build.sh b/pipelines/Docusaurus/templates/build.sh index 81ed33d..a86681e 100755 --- a/pipelines/Docusaurus/templates/build.sh +++ b/pipelines/Docusaurus/templates/build.sh @@ -100,15 +100,13 @@ function configure_site() { cp -r ../archive/* . # we're in site-config, so handle the spec files - if [ -d static/spec ]; then - # preserve the next spec - mv static/spec/next versioned_spec - rm -rf static/spec/* - mv versioned_spec/* static/spec/ - else - # specs are not needed - echo "Spec files not needed" - rm -rf versioned_spec + if [ -d "${docs}/spec" ]; then + if [ ! -d "${static}/spec" ]; then + mkdir -p "${static}/spec" + fi + + cp -r "${docs}/spec/" static/spec/next + cp -r versioned_spec/* static/spec/ fi # link the current docs, it works fine From 362baa446ccfc1acccf25a05f7f527e326caadb4 Mon Sep 17 00:00:00 2001 From: Alex Lourie Date: Fri, 6 Feb 2026 14:43:04 +1030 Subject: [PATCH 3/3] Improve comment Signed-off-by: Alex Lourie --- pipelines/Docusaurus/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pipelines/Docusaurus/Dockerfile b/pipelines/Docusaurus/Dockerfile index b5181f4..67b7fee 100644 --- a/pipelines/Docusaurus/Dockerfile +++ b/pipelines/Docusaurus/Dockerfile @@ -9,7 +9,8 @@ RUN apk add --no-cache \ tar \ jq -# copy the templates first, as they rarily change +# copy the modules first, as they rarily change +# this improves the build times for testing the templates COPY ./node_modules /node_modules RUN mkdir /templates