mirror of
https://github.com/GuerillaStudio/now-playing
synced 2024-12-27 01:41:56 +00:00
Migration to Deuxfleurs infrastructure (#6)
This commit is contained in:
parent
6fa0de6a77
commit
2707ebb45a
7 changed files with 41 additions and 48 deletions
25
.woodpecker.yaml
Normal file
25
.woodpecker.yaml
Normal 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
|
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
|
BIN
hosted_by_deuxfleurs.png
Normal file
BIN
hosted_by_deuxfleurs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -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" }}
|
||||
<link rel="preload" href="{{ $secureStyle.Permalink }}" as="style" />
|
||||
<link rel="stylesheet" href="{{ $secureStyle.Permalink }}" integrity="{{ $secureStyle.Data.Integrity }}">
|
||||
|
|
43
netlify.toml
43
netlify.toml
|
@ -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
BIN
powered_by_garage.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in a new issue