feat: Update deploy
This commit is contained in:
parent
e229adda4e
commit
dd9f3b0ff5
|
@ -1,4 +0,0 @@
|
|||
# Ignore everything
|
||||
**
|
||||
|
||||
!public
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
# drone encrypt kosssi/zebra.life $AWS_ACCESS_KEY_ID
|
||||
kind: secret
|
||||
name: PRODUCTION_AWS_ACCESS_KEY_ID
|
||||
data: /SD/FNPyIA+RFjRlG6Fv07pvL69oJSrZ8bedU+B3xMhFWq/KkGxW4iFRQlTiPah8Ah8RmZsS
|
||||
|
||||
---
|
||||
# drone encrypt kosssi/zebra.life $AWS_SECRET_ACCESS_KEY
|
||||
kind: secret
|
||||
name: PRODUCTION_AWS_SECRET_ACCESS_KEY
|
||||
data: pP6xanltH9bamwETzJ1ZwJ1gJWyd2VpgolZ/KVP+obrwpkX6pjVNdlhXxfGrq3ks5wY+7qBP5Bu8WZpiNRc/gPKkvHCD32W0e8U3icOD1Xk02Zkldd4srO2V8Q0=
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: prod
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: build website
|
||||
image: klakegg/hugo:0.107.0-ext-debian-ci
|
||||
commands:
|
||||
- hugo --minify
|
||||
|
||||
- name: deploy
|
||||
image: klakegg/hugo:0.107.0-ext-debian-ci
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: PRODUCTION_AWS_ACCESS_KEY_ID
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
from_secret: PRODUCTION_AWS_SECRET_ACCESS_KEY
|
||||
commands:
|
||||
- hugo deploy
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
branch:
|
||||
- master
|
|
@ -1,2 +1,3 @@
|
|||
public
|
||||
resources
|
||||
.hugo_build.lock
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
FROM registry.weko.io/nginx-lowtech:0.0.5
|
||||
|
||||
# Copie des sources du site
|
||||
COPY public /usr/share/nginx/html
|
|
@ -4,7 +4,7 @@ title = "Zebra"
|
|||
paginate = 10
|
||||
theme = "casper"
|
||||
canonifyurls = true
|
||||
Copyright = "@ 2020"
|
||||
Copyright = "@ 2022"
|
||||
|
||||
[params]
|
||||
description = "Un mode de vie : le nomadisme"
|
||||
|
@ -16,3 +16,6 @@ Copyright = "@ 2020"
|
|||
[markup.goldmark]
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
|
||||
[[deployment.targets]]
|
||||
URL = "s3://zebra.life?endpoint=http://10.20.20.10:3900&disableSSL=true&s3ForcePathStyle=true®ion=garage"
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
version: "3.8"
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: traefik
|
||||
|
||||
services:
|
||||
zebra_life:
|
||||
container_name: zebra_life
|
||||
build: .
|
||||
restart: always
|
||||
labels:
|
||||
traefik.enable: "true"
|
||||
traefik.http.routers.zebra_life.rule: "Host(`zebra.life`)"
|
||||
traefik.http.routers.zebra_life.entrypoints: "web"
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
54
run
54
run
|
@ -1,54 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# -e Exit immediately if a command exits with a non-zero status.
|
||||
# -u Treat unset variables as an error when substituting.
|
||||
set -eu
|
||||
|
||||
DOCKER_CONTEXT=vert
|
||||
START=`date +%s`
|
||||
|
||||
help() {
|
||||
echo
|
||||
echo "💡 Aide 💡"
|
||||
echo "----------"
|
||||
echo
|
||||
echo "Commandes :"
|
||||
echo "- ./run dev 🚧 Lancement du serveur pour le développement"
|
||||
echo "- ./run dev production 🚧 Lancement du serveur pour le développement sans les brouillons"
|
||||
echo "- ./run prod 🚀 Déploiement du site en mode production"
|
||||
echo
|
||||
}
|
||||
|
||||
prod() {
|
||||
echo
|
||||
echo "🚀 Déploiement du site en mode production 🚀"
|
||||
echo
|
||||
rm -rf public
|
||||
hugo --minify --environment production
|
||||
# node themes/hugo-theme-lowtech/scripts/typo
|
||||
#DATE=`date +\"%Y0101\"` && find public -exec touch -d $DATE {} +
|
||||
docker-compose --context $DOCKER_CONTEXT -f docker-compose.prod.yml up -d --build --force-recreate
|
||||
}
|
||||
|
||||
if [ $# -ge 1 ]; then
|
||||
if [ $1 == "dev" ]; then
|
||||
if [ $# -ge 2 ] && [ $2 == "production" ]; then
|
||||
echo "🚧 Lancement du serveur pour le développement sans les brouillons"
|
||||
hugo server
|
||||
else
|
||||
echo "🚧 Lancement du serveur pour le développement"
|
||||
hugo server -D
|
||||
fi
|
||||
elif [ $1 == "prod" ]; then
|
||||
prod
|
||||
else
|
||||
help
|
||||
fi
|
||||
else
|
||||
help
|
||||
fi
|
||||
|
||||
END=`date +%s`
|
||||
echo
|
||||
echo "✨ Done in $((END-START))s"
|
||||
echo
|
|
@ -16,7 +16,7 @@
|
|||
{{ if .Site.Params.RSSLink}}
|
||||
<a class="menu-button icon-feed" href="{{.Site.Params.RSSLink }}"> Subscribe</a>
|
||||
{{else}}
|
||||
<a class="menu-button icon-feed" href="{{ .RSSLink }}"> Subscribe</a>
|
||||
<a class="menu-button icon-feed" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}"> Subscribe</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</nav>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
{{ if .Site.Params.RSSLink}}
|
||||
<a class="menu-button icon-feed" href="{{.Site.Params.RSSLink }}"> Subscribe</a>
|
||||
{{else}}
|
||||
<a class="menu-button icon-feed" href="{{ .RSSLink }}"> Subscribe</a>
|
||||
<a class="menu-button icon-feed" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}"> Subscribe</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</nav>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
{{ if .Site.Params.RSSLink}}
|
||||
<a class="menu-button icon-feed" href="{{.Site.Params.RSSLink }}"> Subscribe</a>
|
||||
{{else}}
|
||||
<a class="menu-button icon-feed" href="{{ .RSSLink }}"> Subscribe</a>
|
||||
<a class="menu-button icon-feed" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}"> Subscribe</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</nav>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
{{ if .Site.Params.RSSLink}}
|
||||
<a class="menu-button icon-feed" href="{{.Site.Params.RSSLink }}"> Subscribe</a>
|
||||
{{else}}
|
||||
<a class="menu-button icon-feed" href="{{ .RSSLink }}"> Subscribe</a>
|
||||
<a class="menu-button icon-feed" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}"> Subscribe</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</nav>
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
{{ if .Site.Params.RSSLink}}
|
||||
<a class="menu-button icon-feed" href="{{.Site.Params.RSSLink }}"> Subscribe</a>
|
||||
{{else}}
|
||||
<a class="menu-button icon-feed" href="{{ .RSSLink }}"> Subscribe</a>
|
||||
<a class="menu-button icon-feed" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}"> Subscribe</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="menu-button icon-feed" href="{{ .RSSLink }}"> Subscribe</a>
|
||||
<a class="menu-button icon-feed" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}"> Subscribe</a>
|
||||
</nav>
|
||||
<div class="vertical">
|
||||
<div class="main-header-content inner">
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
{{ if .Site.Params.RSSLink}}
|
||||
<a class="menu-button icon-feed" href="{{.Site.Params.RSSLink }}"> Subscribe</a>
|
||||
{{else}}
|
||||
<a class="menu-button icon-feed" href="{{ .RSSLink }}"> Subscribe</a>
|
||||
<a class="menu-button icon-feed" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}"> Subscribe</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</nav>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
{{ partial "twitter_card.html" . }}
|
||||
|
||||
<meta property="og:title" content="{{ if ne .URL "/" }}{{ .Title }} · {{ end }}{{ .Site.Title }}" />
|
||||
<meta property="og:title" content="{{ if ne .Permalink "/" }}{{ .Title }} · {{ end }}{{ .Site.Title }}" />
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
<meta property="og:description" content="{{ .Site.Params.description }}" />
|
||||
{{ end }}
|
||||
|
||||
<title>{{ if ne .URL "/" }}{{ .Title }} · {{ end }}{{ .Site.Title }}</title>
|
||||
<title>{{ if ne .Permalink "/" }}{{ .Title }} · {{ end }}{{ .Site.Title }}</title>
|
||||
|
||||
{{ if .IsPage }}
|
||||
<meta name="description" content="{{ .Description | default (substr .Summary 0 160) }}" />
|
||||
|
@ -67,14 +67,14 @@
|
|||
{{ if .Site.Params.RSSLink}}
|
||||
<link href="{{.Site.Params.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
{{else}}
|
||||
{{ if ne .URL "/" }}
|
||||
{{ if ne .Permalink "/" }}
|
||||
<link href="{{ "index.xml" | relURL}}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
{{ end }}
|
||||
{{if .IsNode}}
|
||||
<link href="{{.RSSLink}}" rel="alternate" type="application/rss+xml" title="{{ if ne .URL "/" }}{{ .Title }} · {{ end }}{{ .Site.Title }}" />
|
||||
<link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="alternate" type="application/rss+xml" title="{{ if ne .Permalink "/" }}{{ .Title }} · {{ end }}{{ .Site.Title }}" />
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{.Hugo.Generator}}
|
||||
{{ hugo.Generator }}
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
{{ if .Site.Params.RSSLink}}
|
||||
<a class="subscribe-button icon-feed" href="{{.Site.Params.RSSLink }}">Subscribe</a> </div>
|
||||
{{else}}
|
||||
<a class="subscribe-button icon-feed" href="{{if .IsNode}}{{.RSSLink}}{{else}}{{"index.xml" | relURL}}{{end}}">Subscribe</a>
|
||||
<a class="subscribe-button icon-feed" href="{{if .IsNode}}{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}{{else}}{{"index.xml" | relURL}}{{end}}">Subscribe</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<span class="nav-cover"></span>
|
||||
|
|
Loading…
Reference in New Issue