Initialisiere Explor.Code.Law mit RII-Pipeline und Strato-Deploy.
Some checks failed
Deploy explore / deploy (push) Failing after 18s

Entscheidungen als Markdown, Normen-Index und schlankes Git-Sync nach /opt/explore (Gitea Actions, ohne Docker).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-17 12:03:40 +02:00
commit bdaa21dc31
30 changed files with 2652 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
# Sync Explor.Code.Law nach /opt/explore
# Gitea Secret: SSH_PRIVATE_KEY
#
# Schlankes Daten-Deploy: nur Git-Checkout, kein Docker.
# Kein git clean / kein reset --hard — ge_xml/ und .env bleiben.
name: Deploy explore
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: explore-deploy
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: python:3.13-bookworm
steps:
- name: Deploy to Server
uses: appleboy/ssh-action@v1.0.3
with:
host: 82.165.92.92
username: root
key: ${{ secrets.SSH_PRIVATE_KEY }}
command_timeout: 15m
script: |
set -euo pipefail
echo "Starting explore deployment..."
mkdir -p /opt/explore
cd /opt/explore
if [ ! -d .git ]; then
git init
git remote add origin https://git.coded.law/michaelkole/explore.git || true
fi
git remote set-url origin https://git.coded.law/michaelkole/explore.git
git fetch origin main
# Tracked Dateien aktualisieren. Kein reset --hard, kein git clean:
# ge_xml/ und .env bleiben unangetastet.
git checkout origin/main -- .
mkdir -p ge_md data ge_xml kommentar
chmod 600 .env 2>/dev/null || true
if [ ! -f .env ] && [ -f env.example ]; then
cp env.example .env
chmod 600 .env
fi
grep -q "^LAWGIT_ROOT=" .env 2>/dev/null || echo "LAWGIT_ROOT=/opt/lawgit" >> .env
grep -q "^DOMAIN=" .env 2>/dev/null || echo "DOMAIN=explore.coded.law" >> .env
echo "ge_md files: $(find ge_md -name '*.md' 2>/dev/null | wc -l)"
echo "index: $([ -f data/normen_index.json ] && wc -c < data/normen_index.json || echo missing) bytes"
echo "ge_xml files (local disk, not from git): $(find ge_xml -type f 2>/dev/null | wc -l)"
echo "Deployment complete!"