Compare commits
5 Commits
chore/fix-
...
bot/anno-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84ce4fb994 | ||
| 708b87ff35 | |||
| 577cfd08e8 | |||
| de9edbe532 | |||
| 006fec7efd |
@@ -4,6 +4,11 @@ on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
force:
|
||||
description: "Force deploy even if gate would skip (1=yes, 0=no)"
|
||||
required: false
|
||||
default: "0"
|
||||
|
||||
env:
|
||||
NODE_OPTIONS: --dns-result-order=ipv4first
|
||||
@@ -68,16 +73,26 @@ jobs:
|
||||
echo "REPO_URL=$REPO_URL" >> /tmp/deploy.env
|
||||
|
||||
- name: Gate — auto deploy only on annotations/media changes
|
||||
env:
|
||||
INPUT_FORCE: ${{ inputs.force }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
source /tmp/deploy.env
|
||||
|
||||
# fichiers touchés par CE commit (merge commit inclus)
|
||||
CHANGED="$(git diff-tree --no-commit-id --name-only -r "$SHA" || true)"
|
||||
source /tmp/deploy.env 2>/dev/null || true
|
||||
|
||||
FORCE="${INPUT_FORCE:-0}"
|
||||
if [[ "$FORCE" == "1" ]]; then
|
||||
echo "✅ force=1 -> bypass gate -> deploy allowed"
|
||||
echo "GO=1" >> /tmp/deploy.env
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# fichiers touchés par CE commit (⚠️ merge commits -> utiliser -m)
|
||||
CHANGED="$(git diff-tree -m --no-commit-id --name-only -r "$SHA" || true)"
|
||||
echo "== changed files =="
|
||||
echo "$CHANGED" | sed -n '1,200p'
|
||||
|
||||
# Gate strict : uniquement annotations + media + le workflow lui-même (si tu veux autoriser)
|
||||
# Gate strict : uniquement annotations + media
|
||||
if echo "$CHANGED" | grep -qE '^(src/annotations/|public/media/)'; then
|
||||
echo "GO=1" >> /tmp/deploy.env
|
||||
echo "✅ deploy allowed (annotations/media change detected)"
|
||||
@@ -122,6 +137,17 @@ jobs:
|
||||
test -n "${PUBLIC_GITEA_REPO:-}" || { echo "❌ missing repo var PUBLIC_GITEA_REPO"; exit 2; }
|
||||
echo "✅ vars OK"
|
||||
|
||||
- name: Assert deploy files exist
|
||||
run: |
|
||||
set -euo pipefail
|
||||
source /tmp/deploy.env
|
||||
[[ "${GO:-0}" == "1" ]] || { echo "ℹ️ skipped"; exit 0; }
|
||||
|
||||
test -f docker-compose.yml
|
||||
test -f Dockerfile
|
||||
test -f nginx.conf
|
||||
echo "✅ deploy files OK"
|
||||
|
||||
- name: Build + deploy staging (blue) then smoke
|
||||
env:
|
||||
PUBLIC_GITEA_BASE: ${{ vars.PUBLIC_GITEA_BASE }}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
@@ -19,3 +19,12 @@ paras:
|
||||
credit: ""
|
||||
ts: 2026-02-25T19:11:32.634Z
|
||||
fromIssue: 121
|
||||
p-11-67c14c09:
|
||||
media:
|
||||
- type: image
|
||||
src: /media/archicrat-ia/chapitre-4/p-11-67c14c09/Capture_d_e_cran_2025-05-05_a_19.20.40.png
|
||||
caption: "[Media] p-11-67c14c09 — Chapitre 4 — Histoire archicratique des
|
||||
révolutions industrielles"
|
||||
credit: ""
|
||||
ts: 2026-02-26T11:54:08.069Z
|
||||
fromIssue: 127
|
||||
|
||||
Reference in New Issue
Block a user