diff --git a/pipelines/Docusaurus/Dockerfile b/pipelines/Docusaurus/Dockerfile index ac3abd9..67b7fee 100644 --- a/pipelines/Docusaurus/Dockerfile +++ b/pipelines/Docusaurus/Dockerfile @@ -8,10 +8,13 @@ RUN apk add --no-cache \ make \ tar \ jq + +# 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 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..a86681e 100755 --- a/pipelines/Docusaurus/templates/build.sh +++ b/pipelines/Docusaurus/templates/build.sh @@ -99,6 +99,16 @@ 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 "${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 ln -s ../docs .