From 2707ebb45a7af4119ab416beb3fe5ad2b4752959 Mon Sep 17 00:00:00 2001 From: Tixie Date: Tue, 23 Apr 2024 23:37:33 +0200 Subject: [PATCH] Migration to Deuxfleurs infrastructure (#6) --- .woodpecker.yaml | 25 ++++++++++++++++++++ README.md | 6 +++-- config.toml | 9 ++++++-- hosted_by_deuxfleurs.png | Bin 0 -> 1098 bytes layouts/_default/baseof.html | 6 ++++- netlify.toml | 43 ----------------------------------- powered_by_garage.png | Bin 0 -> 1159 bytes 7 files changed, 41 insertions(+), 48 deletions(-) create mode 100644 .woodpecker.yaml create mode 100644 hosted_by_deuxfleurs.png delete mode 100644 netlify.toml create mode 100644 powered_by_garage.png diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..a9bfbeb --- /dev/null +++ b/.woodpecker.yaml @@ -0,0 +1,25 @@ +steps: + - name: build hugo + image: alpine:3.19.1 + commands: + - apk update + - apk add hugo + - hugo -b 'https://music.guerilla.studio' + + - name: upload + when: + branch: + - main + image: plugins/s3 + settings: + bucket: music.guerilla.studio + endpoint: https://garage.deuxfleurs.fr + region: garage + access_key: + from_secret: aws_access_key_id + secret_key: + from_secret: aws_secret_access_key + source: public/**/* + target: / + strip_prefix: public/ + path_style: true diff --git a/README.md b/README.md index 5316128..3ae1865 100644 --- a/README.md +++ b/README.md @@ -46,9 +46,11 @@ npm ci ### Admin your website in local -Go to you website's local url + `/admin` (by default it's `http://localhost:1313/admin`). Enjoy! +Go to you website's local url + `/admin` (by default it's `http://localhost:1312/admin`). Enjoy! ## Credits - * [Higgcss](https://github.com/robinparisi/higgcss) - The minimal CSS framework use as skeleton + * [Higgcss](https://github.com/robinparisi/higgcss) - The minimal CSS framework used as skeleton * Wryk for the help and support 💜 + * [Deuxfleurs](https://deuxfleurs.fr) for the wonderful distributed hosting infrastructure (running [Garage](https://garagehq.deuxfleurs.fr)) \ + ![Website hosted by Deuxfleurs](hosted_by_deuxfleurs.png) ![Infrastructure powered by Garage ](powered_by_garage.png) diff --git a/config.toml b/config.toml index aca010f..717ff1e 100644 --- a/config.toml +++ b/config.toml @@ -1,4 +1,4 @@ -baseURL = "http://localhost:1313/" +baseURL = "http://localhost:1312/" languageCode = "en-us" title = "Now Playing" mainSections = ["a"] @@ -17,4 +17,9 @@ disableKinds = ["taxonomy"] quality = 95 [security] [security.funcs] - getenv = [ "^HUGO_", "CONTEXT", "URL" ] + getenv = [ "^HUGO_", "CONTEXT", "URL", "BASE_URL" ] + +## Deploy into a Garage bucket at Deuxfleurs +[[deployment.targets]] +name = "deuxfleurs" +URL = "s3://music.guerilla.studio&endpoint=garage.deuxfleurs.fr®ion=garage&s3ForcePathStyle=true" diff --git a/hosted_by_deuxfleurs.png b/hosted_by_deuxfleurs.png new file mode 100644 index 0000000000000000000000000000000000000000..3058ac9a4035d07876825a81c758689d6b6465b0 GIT binary patch literal 1098 zcmV-Q1hxB#P)EX>4Tx04R}tkv&MmKpe$iQ%glE4(%YtAwzYt4l3eUt5Adrp;l;tBaGOiYVq9Bdjc|#OK8023?T&k?V@fZ=6dG3p_JoWHa-`5n{2_!%7dcvY`=A6US6dr+gvj zvdVdjvsP`e&OP}HLj`?hnd>x1kisICAVGwJ1}dn+LY!8e6cZWRPkQ*Hj$a~|LaquJ zITlcZ2HEk0|H1EW&EnLgn-od{ffw8U7zKj6K)Y$%-^aGyJ^}pCz?I(h*IK~rC+W?u z7CQolwtNAlAYibdf4jJ_!kgl~a?HMh6UK29HiEOnK>0S*p< zu@Yskd%U~9x3_=Kbo%=NsNQnCO(xl_00009a7bBm001r{001r{0eGc9b^rhX2XskI zMF-~$1r-f6yG(b=0000PbVXQnLvL+uWo~o;Lvm$dbY)~9cWHEJAV*0}P*;Ht7XSbP zG)Y83RA}DqS<7w1Fbri3t&oMfMcqR;s85Aw@G(ndpDYmsb%yAH4#QG1O^I@0AQl2c zk(KACC;qG)e%`-eZvf3M0RUWY_kg|Q(7&t-m(TBYEn@74WPf*!4B^TqtSbaQz7~nG zAB3fFe7Ys3ImNX=g+-v_`82lObj=JUg2C7ih=3jXia|=;6`e8_?Bv5D5CG6MR|}dv zw-OwWF@@C>$dOAvm_XYO;p#SJc@?vmk$jUInLMtG_Rn{idj~fV9wWq8Pux{N0<6~f z3VAG;+jirv|H~TjMkRN3?PTf6N(JPDr3B(W#xvZeN>V5J5Qo{hNRx~@1vxdDGU9|< zkSRUn8wH5u9NSJv%O?~Y`ElrR@qSzIlMm0KN8ynKB1Odnk441ZTmIW(^5@g_?E?S~ zbRMB3TRjz*X~DB&Tsu{<2qXFH?f!HP6g4?ds9P&WpkMIPvp7IhAwOBfT#+ZVjN!JK zHL}R#c|@42dAZYa>!NYb>(F}jTNe3+%2Hn;H{eYjw;(Y)`DzC5Zz=auKe&bbH5U2#;lRe}YgrKza zEK6)TLU9&c09gUQ8WG}OB`4>S52m8+an%=3%=G=C^sY=(ZYjk=F?rK@1VSi4qGA#C zY_hyHdYM45JUy2@wLb;bM$Qzf90l21g+F*U_5YZY%w!Sx;_=F@*;T;y3mh>{$CpRK QU;qFB07*qoM6N<$f(`!j!2kdN literal 0 HcmV?d00001 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 8a2eece..dbb7e12 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -42,8 +42,12 @@ {{ end }} {{ end }} + {{ $opts := dict + "vars" site.Params.styles + "enableSourceMap" (not hugo.IsProduction) + }} {{ $sass := resources.Get "/scss/style.scss" }} - {{ $style := $sass | resources.ToCSS | minify | fingerprint }} + {{ $style := $sass | resources.ToCSS $opts | minify | fingerprint }} {{ $secureStyle := $style | resources.Fingerprint "sha512" }} diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index 1dc6399..0000000 --- a/netlify.toml +++ /dev/null @@ -1,43 +0,0 @@ -[build] - publish = "public" - command = "hugo -b $URL" -[build.environment] - HUGO_VERSION = "0.124.1" - - -[context.production.environment] - HUGO_VERSION = "0.124.1" - HUGO_ENV = "production" - command = "hugo -b $URL" - -[context.deploy-preview] - command = "hugo -b $DEPLOY_PRIME_URL" - -[[headers]] - for = "/*" - [headers.values] - X-Frame-Options = "DENY" - X-XSS-Protection = "1; mode=block" - X-Content-Type-Options = "nosniff" - -[[redirects]] - force = true - from = "/a" - to = "/" - -# Old urls - -[[redirects]] - force = true - from = "/musics" - to = "/" - -[[redirects]] - force = true - from = "/musics/*" - to = "/a/:splat" - -[[redirects]] - force = true - from = "/page:*" - to = "/page/:splat" diff --git a/powered_by_garage.png b/powered_by_garage.png new file mode 100644 index 0000000000000000000000000000000000000000..d9275860c971aa867ec4c6dfc4a7176c7df29cb4 GIT binary patch literal 1159 zcmV;21bF+2P)EX>4Tx04R}tkv&MmKpe$iTcx5^5j%*8WT;MdQ4z;lg(6f4wL+^7CYOFelZGV4 z#ZhoAIQX$xb#QUk)xlK|1V2C=otzY1q{ROvg%&X$9QWhhy~o`H!R`};+aiL z=e$oGW<^OMJ|~_q=z_$LT$f#b<6Lmq&ojeDIyFxmCKd{9EVnT$8Y=NLaYRuy%J*kn zRyc2QR?Ah^yeEHQD5tF~bDic05?I6%MCwRJ6(y8mAxf)8iis5M$36VRj$b5~Os*0b zITlcX3d!+<|H1EW&HU7)n-q!zoiDciF$M&8fkw@?zmILZaRLOMfh(=$uhfCrPtt2G zEpi0(Zvz+CElu77E_Z;TCtWfmM+(sN=kvh(8GTb07`z3#*WBKk`#607($rP*1~@nb z#tW3a?(y!f_TK(I)9mjDob__Id?$1E00006VoOIv00000008+zyMF)x010qNS#tmY zE+YT{E+YYWr9XB6000McNliru<_jJY1ve45W!3-y02y>eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00Li0L_t(&-tCz|Qo}F|Mb(V2!h(Zz8;-zm08Z2Cx@V}j ztmq0D_AGjsumA<&DwY(>N!p2KIuIw0?PvK%mN(tUQwOV6vt~t5&rbUTg#PONZE+pk zJbyvAyPu>T0B~*V^!fA7z%_(6#o*?iKswGEphH?fUp|!w%?&mkyC>*SGTW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