Initial Hugo site with Gitea Actions deploy workflow
Some checks failed
Hugo Build & Deploy / build-deploy (push) Failing after 1m5s
Some checks failed
Hugo Build & Deploy / build-deploy (push) Failing after 1m5s
This commit is contained in:
23
.gitea/workflows/hugo-deploy.yml
Normal file
23
.gitea/workflows/hugo-deploy.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Hugo Build & Deploy
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: klakegg/hugo:ext-alpine
|
||||
volumes:
|
||||
- /var/www/blog.bojemoi.me:/deploy
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build Hugo site
|
||||
run: hugo --minify
|
||||
|
||||
- name: Deploy to web root
|
||||
run: |
|
||||
rm -rf /deploy/*
|
||||
cp -r public/* /deploy/
|
||||
echo "Deployed $(date -u '+%Y-%m-%d %H:%M:%S UTC')" > /deploy/.deployed
|
||||
5
archetypes/default.md
Normal file
5
archetypes/default.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: "{{ replace .File.ContentBaseName "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
draft: true
|
||||
---
|
||||
5
content/_index.md
Normal file
5
content/_index.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: "Accueil"
|
||||
---
|
||||
|
||||
Bienvenue sur le blog de Bojemoi Lab.
|
||||
15
content/posts/premier-article.md
Normal file
15
content/posts/premier-article.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "Premier article"
|
||||
date: 2026-02-06
|
||||
draft: false
|
||||
---
|
||||
|
||||
Bienvenue sur le blog Bojemoi Lab.
|
||||
|
||||
Ce blog est automatiquement buildé et déployé via **Gitea Actions** et **Hugo**.
|
||||
|
||||
## Stack technique
|
||||
|
||||
- **Hugo** pour la génération de site statique
|
||||
- **Gitea Actions** + `act_runner` pour le CI/CD
|
||||
- **Nginx** + Let's Encrypt pour le serving HTTPS
|
||||
10
hugo.toml
Normal file
10
hugo.toml
Normal file
@@ -0,0 +1,10 @@
|
||||
baseURL = 'https://blog.bojemoi.me/'
|
||||
languageCode = 'fr'
|
||||
title = 'Bojemoi Blog'
|
||||
theme = ''
|
||||
|
||||
[params]
|
||||
description = "Blog technique - Bojemoi Lab"
|
||||
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
21
layouts/_default/baseof.html
Normal file
21
layouts/_default/baseof.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1><a href="/">{{ .Site.Title }}</a></h1>
|
||||
<p>{{ .Site.Params.description }}</p>
|
||||
</header>
|
||||
<main>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
<footer>
|
||||
<p>© {{ now.Year }} {{ .Site.Title }}</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
12
layouts/_default/list.html
Normal file
12
layouts/_default/list.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }}
|
||||
{{ define "main" }}
|
||||
<h2>{{ .Title }}</h2>
|
||||
{{ .Content }}
|
||||
{{ range .Pages }}
|
||||
<article>
|
||||
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
|
||||
<time>{{ .Date.Format "2 January 2006" }}</time>
|
||||
<p>{{ .Summary }}</p>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
9
layouts/_default/single.html
Normal file
9
layouts/_default/single.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }}
|
||||
{{ define "main" }}
|
||||
<article>
|
||||
<h2>{{ .Title }}</h2>
|
||||
<time>{{ .Date.Format "2 January 2006" }}</time>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
<a href="/">← Retour</a>
|
||||
{{ end }}
|
||||
12
layouts/index.html
Normal file
12
layouts/index.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{ define "title" }}{{ .Site.Title }}{{ end }}
|
||||
{{ define "main" }}
|
||||
{{ .Content }}
|
||||
<h2>Articles</h2>
|
||||
{{ range site.RegularPages }}
|
||||
<article>
|
||||
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
|
||||
<time>{{ .Date.Format "2 January 2006" }}</time>
|
||||
<p>{{ .Summary }}</p>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
11
static/css/style.css
Normal file
11
static/css/style.css
Normal file
@@ -0,0 +1,11 @@
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: 1.6; max-width: 800px; margin: 0 auto; padding: 2rem; color: #333; }
|
||||
header { margin-bottom: 2rem; border-bottom: 2px solid #eee; padding-bottom: 1rem; }
|
||||
header h1 a { color: #333; text-decoration: none; }
|
||||
header p { color: #666; }
|
||||
article { margin-bottom: 2rem; }
|
||||
article h3 a { color: #0066cc; text-decoration: none; }
|
||||
article h3 a:hover { text-decoration: underline; }
|
||||
article time { color: #999; font-size: 0.9rem; }
|
||||
footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid #eee; color: #999; font-size: 0.85rem; }
|
||||
h2 { margin: 1.5rem 0 1rem; }
|
||||
Reference in New Issue
Block a user