From f0eed66f763eb88711f0827ddfef008f973ebcaa Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Tue, 22 Aug 2023 21:50:37 +0200 Subject: [PATCH 1/4] release: force npm cache clean Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d0dd010fc6..7cd3f6922b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN apk --update add nodejs npm git FROM base as node COPY package*.json . -RUN npm install +RUN npm install && npm cache clean --force FROM base as hugo ARG HUGO_VERSION=0.116.1 From 0609289f6ed15304976ad26d94ae720cb8bb6ef8 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Tue, 22 Aug 2023 21:51:03 +0200 Subject: [PATCH 2/4] release: dont use absolute path to hugo binary Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7cd3f6922b..0fe13761b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ FROM build-base as build ARG HUGO_ENV ARG DOCS_URL COPY . . -RUN /bin/hugo --gc --minify -d /out -e $HUGO_ENV -b $DOCS_URL +RUN hugo --gc --minify -d /out -e $HUGO_ENV -b $DOCS_URL FROM scratch as release COPY --from=build /out / From 92bccbcf15c2ea6b969131807ca9fc4d9b812964 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Tue, 22 Aug 2023 21:52:42 +0200 Subject: [PATCH 3/4] release: remove unnecessary build-arg Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1505f74a3e..7836bb561e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,6 @@ jobs: set: | *.cache-from=type=gha,scope=build *.cache-to=type=gha,scope=build,mode=max - *.args.HUGO_ENV=production validate: runs-on: ubuntu-20.04 From 6d9593a9287e59ff2add9878f02390a7469cf363 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Tue, 22 Aug 2023 22:49:22 +0200 Subject: [PATCH 4/4] release: fix go redirects Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- _redirects.yml => data/redirects.yml | 0 layouts/index.redirects.json | 5 +++++ 2 files changed, 5 insertions(+) rename _redirects.yml => data/redirects.yml (100%) diff --git a/_redirects.yml b/data/redirects.yml similarity index 100% rename from _redirects.yml rename to data/redirects.yml diff --git a/layouts/index.redirects.json b/layouts/index.redirects.json index 6bc867b563..fe1162e574 100644 --- a/layouts/index.redirects.json +++ b/layouts/index.redirects.json @@ -10,4 +10,9 @@ {{- end -}} {{- end -}} {{- end -}} +{{- range $target, $aliases := site.Data.redirects -}} +{{- range $aliases }} +{{- $redirects.SetInMap "paths" . $target -}} +{{- end -}} +{{- end -}} {{ $redirects.Get "paths" | jsonify }}