1
0
Fork 0
mirror of https://github.com/GuerillaStudio/now-playing synced 2024-12-30 14:41:55 +00:00

Migration to Deuxfleurs infrastructure (#6)
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Tixie Salander 2024-04-23 23:37:33 +02:00 committed by GitHub
parent 6fa0de6a77
commit 2707ebb45a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 41 additions and 48 deletions

25
.woodpecker.yaml Normal file
View file

@ -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

View file

@ -46,9 +46,11 @@ npm ci
### Admin your website in local ### 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 ## 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 💜 * 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)

View file

@ -1,4 +1,4 @@
baseURL = "http://localhost:1313/" baseURL = "http://localhost:1312/"
languageCode = "en-us" languageCode = "en-us"
title = "Now Playing" title = "Now Playing"
mainSections = ["a"] mainSections = ["a"]
@ -17,4 +17,9 @@ disableKinds = ["taxonomy"]
quality = 95 quality = 95
[security] [security]
[security.funcs] [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&region=garage&s3ForcePathStyle=true"

BIN
hosted_by_deuxfleurs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -42,8 +42,12 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ $opts := dict
"vars" site.Params.styles
"enableSourceMap" (not hugo.IsProduction)
}}
{{ $sass := resources.Get "/scss/style.scss" }} {{ $sass := resources.Get "/scss/style.scss" }}
{{ $style := $sass | resources.ToCSS | minify | fingerprint }} {{ $style := $sass | resources.ToCSS $opts | minify | fingerprint }}
{{ $secureStyle := $style | resources.Fingerprint "sha512" }} {{ $secureStyle := $style | resources.Fingerprint "sha512" }}
<link rel="preload" href="{{ $secureStyle.Permalink }}" as="style" /> <link rel="preload" href="{{ $secureStyle.Permalink }}" as="style" />
<link rel="stylesheet" href="{{ $secureStyle.Permalink }}" integrity="{{ $secureStyle.Data.Integrity }}"> <link rel="stylesheet" href="{{ $secureStyle.Permalink }}" integrity="{{ $secureStyle.Data.Integrity }}">

View file

@ -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"

BIN
powered_by_garage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB