Author SHA1 Message Date
deploy 785b3c5b43 Site vitrine 2.0 — modernisation UI (nav, home, typo, shortcodes).
Déploiement Hugo Staging / deploy-staging (push) Waiting to run
Intègre feature/modernisation-vitrine en squash. Workflows : staging sur
site/v3 uniquement ; production en workflow_dispatch (jamais sur push).
2026-10-08 12:24:52 +02:00
3 changed files with 52 additions and 27 deletions
+34
View File
@@ -0,0 +1,34 @@
# Production : lancement manuel uniquement.
# Aucun push (master, site/v3, …) ne doit déployer ptits-pas.fr.
name: Déploiement Hugo production
on:
workflow_dispatch:
jobs:
deploy-production:
runs-on: self-hosted
steps:
- name: Déployer sur ptits-pas.fr (ordre explicite)
shell: bash
run: |
set -e
COMPOSE_DIR=/home/deploy/infra_v2/apps/site-vitrine
SITE_DIR=/home/deploy/infra_v2/site-vitrine
git config --global --add safe.directory "$SITE_DIR"
cd "$SITE_DIR"
# Ne pas écraser static/robots.txt (Allow prod, hors sync Git)
git fetch origin
git checkout master
git pull --ff-only origin master
/bin/cp -f /home/deploy/infra_v2/backups/robots-prod-allow-2026-10-08.txt "$SITE_DIR/static/robots.txt" 2>/dev/null || true
cd "$COMPOSE_DIR"
docker compose -f docker-compose.yml run --rm hugo-build
# Restaurer Allow dans public après build Hugo (static peut être Disallow en Git)
/bin/cp -f /home/deploy/infra_v2/backups/robots-prod-allow-2026-10-08.txt /home/deploy/infra_v2/site-vitrine/public/robots.txt
docker compose -f docker-compose.yml up -d --force-recreate site-vitrine
echo "Production mise à jour à $(date)"
+18
View File
@@ -0,0 +1,18 @@
# Staging : push sur site/v3 uniquement.
name: Déploiement Hugo Staging
on:
push:
branches:
- site/v3
jobs:
deploy-staging:
runs-on: self-hosted
steps:
- name: Déployer sur staging.ptits-pas.fr
shell: bash
run: |
set -e
git config --global --add safe.directory /home/deploy/staging
/home/deploy/infra_v2/apps/hooks/deploy-hugo.sh
-27
View File
@@ -1,27 +0,0 @@
name: Déploiement Hugo Staging
on:
push:
branches:
- master
jobs:
deploy-staging:
runs-on: self-hosted
steps:
- name: Déployer sur staging
shell: bash
run: |
# Déclare /home/deploy/staging comme safe pour Git
git config --global --add safe.directory /home/deploy/staging
# Dirige-toi dans le clone staging
cd /home/deploy/staging
# Récupère la dernière version de master
git pull origin master
# Relance le service Hugo-staging
docker compose -f /home/deploy/infra/docker-compose.staging.yml up -d
echo "Staging mis à jour à $(date)"