diff --git a/README.md b/README.md index 1bf74c6..d88f1c3 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,308 @@ -# Webseite Stines – Hugo + Terraform GitOps +# Webseite Stines – Hugo + Terraform GitOps Pipeline -## Workflow +Eine vollautomatisierte Deployment-Pipeline mit Staging und Production Umgebungen. -### Staging (automatisch bei Push auf `main`) -- Terraform prüft ob Staging-LXC existiert → erstellt ihn falls nicht -- Hugo baut die Site -- Deploy auf `staging.stines.de` - -### Production (bei Git Tag `v*`) -```bash -git tag v1.0.0 -git push origin v1.0.0 +**Workflow:** +``` +Push → Gitea Actions → Terraform (Staging) → Hugo Build → Deploy +Tag → Gitea Actions → Hugo Build → Deploy auf Production ``` -- Hugo baut die Site -- Deploy auf `stines.de` -## Lokale Entwicklung +--- + +## 🚀 Quick Start (lokale Entwicklung) + ```bash cd hugo -hugo server -D +hugo server -D # Öffnet http://localhost:1313 ``` + +--- + +## 📋 Nächste Schritte – Einmaliges Setup + +### 1️⃣ Gitea Runner installieren + +Der Runner führt die Workflows aus. Wähle einen Host (Proxmox-Node, dein PC, oder eine dedizierte VM): + +**Auf deinem System:** + +```bash +# Binary herunterladen +mkdir -p /opt/gitea-runner && cd /opt/gitea-runner +wget https://dl.gitea.com/act_runner/latest/act_runner-linux-amd64 +chmod +x act_runner-linux-amd64 + +# Runner registrieren +# Token holst du hier: https://gitlab.stines.de/sebastian.serfling/Webseite_Stines/settings/actions/runners +./act_runner-linux-amd64 register \ + --instance https://gitlab.stines.de \ + --token DEIN_RUNNER_TOKEN \ + --name webseite-runner \ + --labels ubuntu-latest \ + --no-interactive + +# Als Systemd-Service einrichten +sudo tee /etc/systemd/system/gitea-runner.service > /dev/null <