From 50b4310341edd19de060671a6a06e7894276ea11 Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Sun, 7 Dec 2025 14:31:51 +0100 Subject: [PATCH 1/3] update netlify deploy * improve preview feedback to provide more output * add `site.min.css` symbolic link for archived sites Signed-off-by: Toshaan Bharvani --- bin/netlify-production.sh | 9 ++++++--- bin/netlify.sh | 9 +++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bin/netlify-production.sh b/bin/netlify-production.sh index 57ae0bbb6c4..38d42f17503 100755 --- a/bin/netlify-production.sh +++ b/bin/netlify-production.sh @@ -1,4 +1,7 @@ -# npm rebuild +#!/bin/bash + +rm -rf public/css/site.min.css hugo version -hugo --theme=devopsdays-theme --buildDrafts=false --baseURL="$URL/" -# gulp +hugo --environment=production --theme=devopsdays-theme --minify --templateMetrics --logLevel info --buildDrafts=false --baseURL="$URL/" +CSSFINGERPRINTED=$(ls public/css/site.min.*.css) +ln -s $(basename $CSSFINGERPRINTED) public/css/site.min.css diff --git a/bin/netlify.sh b/bin/netlify.sh index fdaeb85fb60..60bd2431371 100755 --- a/bin/netlify.sh +++ b/bin/netlify.sh @@ -1,3 +1,8 @@ +#!/bin/bash + +rm -rf public/css/site.min.css hugo version -hugo --theme=devopsdays-theme --buildDrafts=false --baseURL="$DEPLOY_PRIME_URL" -cp bin/staging-robots.txt public/robots.txt \ No newline at end of file +hugo --environment=development --theme=devopsdays-theme --buildDrafts=false --templateMetrics --templateMetricsHints --printMemoryUsage --printPathWarnings --printUnusedTemplates --printI18nWarnings --logLevel debug --baseURL="$DEPLOY_PRIME_URL" +cp bin/staging-robots.txt public/robots.txt +CSSFINGERPRINTED=$(ls public/css/site.min.*.css) +ln -s $(basename $CSSFINGERPRINTED) public/css/site.min.css From 957478ff612d589eccaa629cdfd9bc8b5692df6d Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Sun, 7 Dec 2025 22:09:01 +0100 Subject: [PATCH 2/3] change to use copy file * netlify does not support symbolic links * copy the site.min.{fingerprint}.css to site.min.css Signed-off-by: Toshaan Bharvani --- bin/netlify-production.sh | 3 +-- bin/netlify.sh | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/netlify-production.sh b/bin/netlify-production.sh index 38d42f17503..4376b941cc2 100755 --- a/bin/netlify-production.sh +++ b/bin/netlify-production.sh @@ -1,7 +1,6 @@ #!/bin/bash -rm -rf public/css/site.min.css hugo version hugo --environment=production --theme=devopsdays-theme --minify --templateMetrics --logLevel info --buildDrafts=false --baseURL="$URL/" CSSFINGERPRINTED=$(ls public/css/site.min.*.css) -ln -s $(basename $CSSFINGERPRINTED) public/css/site.min.css +cp -f $CSSFINGERPRINTED public/css/site.min.css diff --git a/bin/netlify.sh b/bin/netlify.sh index 60bd2431371..56d44f36768 100755 --- a/bin/netlify.sh +++ b/bin/netlify.sh @@ -1,8 +1,7 @@ #!/bin/bash -rm -rf public/css/site.min.css hugo version hugo --environment=development --theme=devopsdays-theme --buildDrafts=false --templateMetrics --templateMetricsHints --printMemoryUsage --printPathWarnings --printUnusedTemplates --printI18nWarnings --logLevel debug --baseURL="$DEPLOY_PRIME_URL" cp bin/staging-robots.txt public/robots.txt CSSFINGERPRINTED=$(ls public/css/site.min.*.css) -ln -s $(basename $CSSFINGERPRINTED) public/css/site.min.css +cp -fv $CSSFINGERPRINTED public/css/site.min.css From a6c65b269a490f3d92d4ea389be8045afcc9cffb Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Sun, 7 Dec 2025 22:42:27 +0100 Subject: [PATCH 3/3] get the name of the old file correct Signed-off-by: Toshaan Bharvani --- bin/netlify-production.sh | 2 +- bin/netlify.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/netlify-production.sh b/bin/netlify-production.sh index 4376b941cc2..dc58fb304e1 100755 --- a/bin/netlify-production.sh +++ b/bin/netlify-production.sh @@ -3,4 +3,4 @@ hugo version hugo --environment=production --theme=devopsdays-theme --minify --templateMetrics --logLevel info --buildDrafts=false --baseURL="$URL/" CSSFINGERPRINTED=$(ls public/css/site.min.*.css) -cp -f $CSSFINGERPRINTED public/css/site.min.css +cp -f $CSSFINGERPRINTED public/css/site.css diff --git a/bin/netlify.sh b/bin/netlify.sh index 56d44f36768..b8f9e54e15f 100755 --- a/bin/netlify.sh +++ b/bin/netlify.sh @@ -4,4 +4,4 @@ hugo version hugo --environment=development --theme=devopsdays-theme --buildDrafts=false --templateMetrics --templateMetricsHints --printMemoryUsage --printPathWarnings --printUnusedTemplates --printI18nWarnings --logLevel debug --baseURL="$DEPLOY_PRIME_URL" cp bin/staging-robots.txt public/robots.txt CSSFINGERPRINTED=$(ls public/css/site.min.*.css) -cp -fv $CSSFINGERPRINTED public/css/site.min.css +cp -fv $CSSFINGERPRINTED public/css/site.css