22 Commits

Author SHA1 Message Date
hsiegeln
ca2a725953 ci(deploy): merge build+deploy into one job, manual trigger only
All checks were successful
ci / build-test (push) Successful in 4m0s
Two changes:

1. Merge build and deploy jobs into a single 'deploy' job. This
   eliminates the actions/upload-artifact@v3 round-trip, which was
   silently stripping dotfiles (.htaccess) from the artifact and
   leaving the deployed origin without security headers. The built
   dist/ (including .htaccess) now flows directly into rsync in the
   same workspace.

2. Remove the 'push: branches: [main]' trigger so deploy runs only
   on workflow_dispatch (manual click in Gitea Actions UI).
   Merges to main no longer auto-deploy — production promotion is
   an explicit user action.

The concurrency group at workflow level still prevents overlapping
deploys. All secrets remain unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 21:24:42 +02:00
hsiegeln
fdb0411c35 Sync main into feat/initial-build before merge-jobs refactor 2026-04-24 21:23:58 +02:00
hsiegeln
461b5e0cd6 Merge branch 'feat/initial-build' into main
Some checks failed
deploy / build (push) Successful in 36s
deploy / deploy (push) Failing after 14s
ci / build-test (push) Successful in 3m54s
Copy public/.htaccess into dist after Astro build (Astro/Vite drops
dotfiles from public/ otherwise, leaving the origin without HSTS).

# Conflicts:
#	.gitea/workflows/deploy.yml
2026-04-24 21:09:35 +02:00
hsiegeln
0d743402ac ci(deploy): copy public/.htaccess into dist after build
All checks were successful
ci / build-test (push) Successful in 3m47s
Astro/Vite drops dotfiles from public/ during build, so .htaccess
never makes it into dist/. The deployed Apache origin then has no
header rules to apply, leaving the site without HSTS, X-Frame-Options,
Referrer-Policy, etc. — caught today by the post-deploy smoke test
("HSTS missing").

Copy the file explicitly after build. test -f makes the step fail
loudly if public/.htaccess goes missing, rather than silently
shipping a header-less site.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 21:08:51 +02:00
hsiegeln
28fcaf16c5 Merge branch 'feat/initial-build' into main
Some checks failed
ci / build-test (push) Successful in 4m2s
deploy / build (push) Successful in 30s
deploy / deploy (push) Failing after 13s
Revert to rsync, route through Hetzner's SSH port 222 (the shell port,
as opposed to port 22 which is SFTP-only).
2026-04-24 20:24:33 +02:00
hsiegeln
e3fbbbada7 ci(deploy): revert to rsync via SSH port 222 (Hetzner shell port)
All checks were successful
ci / build-test (push) Successful in 3m57s
Hetzner Webhosting exposes SSH on TWO ports:
  port 22  — SFTP only, refuses remote command exec
  port 222 — full SSH with shell, supports rsync

Previous deploys hit "exec request failed on channel 0" because we
were using port 22. Switch back from lftp to plain rsync, but route
it through port 222 with --rsync-path=/usr/bin/rsync (Hetzner's
locked-down PATH doesn't include rsync by default) and BatchMode=yes
to disable interactive prompts.

Mirrors the working local command:
  rsync -avz --rsync-path=/usr/bin/rsync \
    -e "ssh -p 222 -i ~/.ssh/id_ed25519_gitea -o BatchMode=yes" \
    ./ apibny@www691.your-server.de:/usr/www/users/apibny/www.cameleer.io

Keeps host-key pinning (StrictHostKeyChecking + UserKnownHostsFile)
which the local command omits because the user's personal known_hosts
already trusts the host.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 20:24:27 +02:00
hsiegeln
cb21be71f0 Merge branch 'feat/initial-build' into main
Some checks failed
ci / build-test (push) Successful in 3m55s
deploy / build (push) Successful in 28s
deploy / deploy (push) Failing after 12s
Fix lftp auth (explicit -u USER, + unindented heredoc body).
2026-04-24 20:08:29 +02:00
hsiegeln
5417565e34 ci(deploy): fix lftp auth — explicit empty password + unindented script
All checks were successful
ci / build-test (push) Successful in 4m0s
Two issues from the previous lftp run:
- "GetPass() failed -- assume anonymous login" / "Password required":
  without `-u USER,` (trailing comma = empty password), lftp tries
  to prompt for a password instead of relying on the ssh key passed
  via sftp:connect-program.
- Heredoc body was indented with leading whitespace; lftp can mis-
  parse leading-whitespace lines as command continuations.

Also bump verbosity (`debug 3`) so the ssh command lftp launches
is logged — makes the next failure easier to read — and bound
retries to 1 so we fail fast in CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 20:08:22 +02:00
hsiegeln
60813e44d9 Merge branch 'feat/initial-build' into main
Some checks failed
ci / build-test (push) Successful in 4m1s
deploy / build (push) Successful in 31s
deploy / deploy (push) Failing after 27s
Switch deploy from rsync-over-SSH to lftp mirror over SFTP —
Hetzner Webhosting is SFTP-only and refuses remote exec.
2026-04-24 19:49:54 +02:00
hsiegeln
64aa8f426b ci(deploy): switch from rsync to lftp mirror (SFTP-only hosting)
All checks were successful
ci / build-test (push) Successful in 3m55s
Hetzner Webhosting accepts SSH for file transfer but refuses remote
command exec, failing rsync with:

  exec request failed on channel 0
  rsync error: error in rsync protocol data stream (code 12)

rsync over SSH requires spawning a remote rsync binary, which isn't
possible on SFTP-only tiers. Switch the mirror to lftp, which speaks
SFTP end-to-end. Same semantics (upload + delete removed files), same
key + known_hosts pinning via sftp:connect-program.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 19:49:42 +02:00
hsiegeln
c438d67469 Merge branch 'feat/initial-build' into main
Some checks failed
deploy / build (push) Successful in 33s
ci / build-test (push) Successful in 4m18s
deploy / deploy (push) Failing after 13s
Brings in the CI infrastructure fixes:
- ci.yml: probe Chromium binary; fall back to Playwright (95977c8)
- tailwind: lift text-faint to meet WCAG AA contrast (2fde385)
- deploy.yml: pin artifact actions to v3 for Gitea (bbd68ec)
2026-04-24 19:12:55 +02:00
hsiegeln
bbd68eca1f ci(deploy): pin upload/download-artifact to v3 for Gitea Actions
All checks were successful
ci / build-test (push) Successful in 3m59s
actions/upload-artifact@v4 and download-artifact@v4 use the
@actions/artifact v2+ client, which targets a github.com-only
backend and fails on Gitea / Forgejo / GHES with:

  GHESNotSupportedError: @actions/artifact v2.0.0+, upload-artifact@v4+
  and download-artifact@v4+ are not currently supported on GHES.

Pin both to v3, which uses the older artifact protocol that Gitea
Actions implements.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 19:12:34 +02:00
bb6b8e63d7 .gitea/workflows/deploy.yml aktualisiert
Some checks failed
deploy / build (push) Failing after 32s
deploy / deploy (push) Has been skipped
ci / build-test (push) Failing after 57s
2026-04-24 19:04:16 +02:00
hsiegeln
2fde385ecf theme: lift text-faint to meet WCAG AA contrast
All checks were successful
ci / build-test (push) Successful in 3m39s
text-faint #6b7280 on bg #060a13 measures ~4.06:1 contrast — under the
4.5:1 normal-text threshold — which fails Lighthouse's color-contrast
audit and drops the accessibility score to 0.90 on /pricing and
/privacy (the only pages currently using this token).

#828b9b yields ~5.66:1, clears AA with margin, and stays visually
distinct from text-muted (#9aa3b2, ~7.8:1) so the design hierarchy
between text / text-muted / text-faint is preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 18:57:40 +02:00
hsiegeln
95977c8d6c ci: probe Chromium binary, fall back to Playwright-bundled
Some checks failed
ci / build-test (push) Failing after 3m35s
The Ubuntu runner image ships /usr/bin/chromium-browser as a snap
forwarder stub that exits with "install via snap" when invoked but
is found on PATH. The previous detection used `command -v` only, so
it accepted the stub, set CHROME_PATH to it, and Lighthouse later
failed to launch Chrome (ECONNREFUSED on the debug port).

Probe each candidate with `--version` to confirm it actually runs.
When no working system binary exists, install Playwright's bundled
Chromium (supports linux/arm64) with --with-deps for system libs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 18:50:28 +02:00
b9b17df0ea .gitea/workflows/ci.yml aktualisiert
Some checks failed
ci / build-test (push) Failing after 2m12s
2026-04-24 18:25:52 +02:00
d772048fb4 .gitea/workflows/ci.yml aktualisiert
Some checks failed
ci / build-test (push) Has been cancelled
2026-04-24 18:10:49 +02:00
259871d34a Merge pull request 'feat/initial-build' (#3) from feat/initial-build into main
Some checks failed
ci / build-test (push) Failing after 1m3s
deploy / build (push) Failing after 51s
deploy / deploy (push) Has been skipped
Reviewed-on: #3
2026-04-24 18:09:37 +02:00
hsiegeln
295e2bcfff replaced TBD with TODO
Some checks failed
ci / build-test (push) Failing after 49s
ci / build-test (pull_request) Failing after 1m6s
2026-04-24 18:06:32 +02:00
hsiegeln
93131461b8 Fix CI build: read PUBLIC_* values from secrets context, broaden TODO guard
Some checks failed
ci / build-test (push) Failing after 46s
- Switch ci.yml + deploy.yml env bindings from ${{ vars.* }} to
  ${{ secrets.* }}. Gitea lets you put non-sensitive Actions values in
  either tab, and the secrets tab was used in practice — workflow was
  reading the wrong context and getting empty strings.
- Broaden the "no TODO markers ship" guard to accept both TODO: and
  legacy TBD: prefixes, matching the imprint/privacy page markers that
  were recently renamed.
- Document the secret-vs-variable choice in OPERATOR-CHECKLIST so the
  next operator doesn't get tripped up by the same thing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 18:04:16 +02:00
ba6069f14e Merge pull request 'replaced TBD with TODO' (#2) from feat/initial-build into main
Some checks failed
deploy / build (push) Has been cancelled
deploy / deploy (push) Has been cancelled
ci / build-test (push) Failing after 1m6s
Reviewed-on: #2
2026-04-24 18:00:52 +02:00
hsiegeln
9a4644bada replaced TBD with TODO
Some checks failed
ci / build-test (push) Failing after 51s
ci / build-test (pull_request) Failing after 1m4s
2026-04-24 17:58:49 +02:00
6 changed files with 84 additions and 76 deletions

View File

@@ -23,9 +23,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
PUBLIC_AUTH_SIGNIN_URL: ${{ vars.PUBLIC_AUTH_SIGNIN_URL }}
PUBLIC_AUTH_SIGNUP_URL: ${{ vars.PUBLIC_AUTH_SIGNUP_URL }}
PUBLIC_SALES_EMAIL: ${{ vars.PUBLIC_SALES_EMAIL }}
PUBLIC_AUTH_SIGNIN_URL: ${{ secrets.PUBLIC_AUTH_SIGNIN_URL }}
PUBLIC_AUTH_SIGNUP_URL: ${{ secrets.PUBLIC_AUTH_SIGNUP_URL }}
PUBLIC_SALES_EMAIL: ${{ secrets.PUBLIC_SALES_EMAIL }}
steps:
- uses: actions/checkout@v4
@@ -36,39 +36,46 @@ jobs:
cache: 'npm'
# Lighthouse CI needs a Chrome/Chromium binary at runtime. Google Chrome
# has no Linux/arm64 build, so install distro Chromium and export its
# path. Handles both `chromium` (Debian) and `chromium-browser` (older
# Ubuntu) package names, and works whether sudo is present or absent
# (e.g. runner running as root).
# has no Linux/arm64 build, so we use distro Chromium when available and
# fall back to Playwright's bundled Chromium (which supports linux/arm64)
# when not. The Ubuntu runner ships /usr/bin/chromium-browser as a snap
# forwarder stub that is on PATH but only prints "install via snap" when
# invoked — so we MUST probe each candidate by actually running it,
# not just `command -v`.
- name: Install Chromium for Lighthouse CI
shell: bash
run: |
set -e
if command -v sudo >/dev/null 2>&1; then SUDO=sudo; else SUDO=; fi
set -euo pipefail
resolve_chromium() {
command -v chromium 2>/dev/null \
|| command -v chromium-browser 2>/dev/null \
|| true
probe() {
local bin="${1:-}"
[ -n "$bin" ] && [ -x "$bin" ] && "$bin" --version >/dev/null 2>&1
}
CHROME_BIN="$(resolve_chromium)"
if [ -z "$CHROME_BIN" ]; then
$SUDO apt-get update -qq
$SUDO apt-get install -y --no-install-recommends \
chromium chromium-driver \
|| $SUDO apt-get install -y --no-install-recommends \
chromium-browser chromium-chromedriver
CHROME_BIN="$(resolve_chromium)"
fi
CHROME_BIN=""
for cand in \
"$(command -v chromium 2>/dev/null || true)" \
"$(command -v chromium-browser 2>/dev/null || true)" \
"$(command -v google-chrome 2>/dev/null || true)"; do
if probe "$cand"; then CHROME_BIN="$cand"; break; fi
done
if [ -z "$CHROME_BIN" ]; then
echo "Failed to install a Chromium binary — Lighthouse CI cannot run."
echo "No working system Chromium — installing Playwright-bundled Chromium."
# --with-deps apt-installs the system libraries Chromium needs
# (libnss3, libatk1.0-0, etc.). Playwright handles sudo internally.
npx -y playwright@latest install --with-deps chromium
CHROME_BIN="$(find "$HOME/.cache/ms-playwright" \
-type f -name chrome -executable 2>/dev/null | head -n1)"
fi
if ! probe "$CHROME_BIN"; then
echo "Failed to install a working Chromium binary." >&2
exit 1
fi
echo "CHROME_PATH=$CHROME_BIN" >> "$GITHUB_ENV"
"$CHROME_BIN" --version || true
"$CHROME_BIN" --version
- name: Install dependencies
run: npm ci
@@ -81,8 +88,8 @@ jobs:
- name: Guard — no TBD markers may ship in built HTML
run: |
if grep -rl 'TBD:' dist 2>/dev/null | grep -E '\.(html|svg)$'; then
echo "Built output contains unfilled <TBD:...> markers."
if grep -rlE '(TBD):' dist 2>/dev/null | grep -E '\.(html|svg)$'; then
echo "Built output contains unfilled <TBD:...>) markers."
echo "Fill in imprint.astro and privacy.astro operator fields before merging to main."
exit 1
fi

View File

@@ -1,10 +1,14 @@
# -----------------------------------------------------------------------------
# cameleer-website — Deploy to Hetzner Webhosting L
#
# Runs ONLY on pushes to `main` and on manual dispatch from the Gitea UI.
# Does NOT run Lighthouse CI (that's in ci.yml — assume any commit that reached
# main already passed the full gate). Rebuilds fresh, runs the TBD guard, and
# rsyncs `dist/` to the origin over SSH with host-key pinning.
# MANUAL TRIGGER ONLY. Runs exclusively on workflow_dispatch from the Gitea UI
# (Actions → deploy → Run workflow). Does NOT auto-deploy on push to main —
# merges to main must be explicitly promoted to production.
#
# Build and deploy run in a single job so the built dist/ (including
# dotfiles like .htaccess) flows directly into rsync. An earlier split-job
# design was abandoned because actions/upload-artifact@v3 excludes dotfiles
# by default and the v4 client does not work on Gitea Actions / GHES.
#
# Runner: self-hosted arm64 Gitea runner. Adjust `runs-on` if your runner's
# labels differ. Deploy target is Hetzner amd64 — arch mismatch is a non-issue
@@ -12,15 +16,12 @@
#
# Required secrets (repo settings → Actions → Secrets):
# SFTP_HOST, SFTP_USER, SFTP_PATH, SFTP_KEY, SFTP_KNOWN_HOSTS
# Required variables (repo settings → Actions → Variables):
# PUBLIC_AUTH_SIGNIN_URL, PUBLIC_AUTH_SIGNUP_URL, PUBLIC_SALES_EMAIL
# -----------------------------------------------------------------------------
name: deploy
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
@@ -28,13 +29,13 @@ concurrency:
cancel-in-progress: false
jobs:
build:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 25
env:
PUBLIC_AUTH_SIGNIN_URL: ${{ vars.PUBLIC_AUTH_SIGNIN_URL }}
PUBLIC_AUTH_SIGNUP_URL: ${{ vars.PUBLIC_AUTH_SIGNUP_URL }}
PUBLIC_SALES_EMAIL: ${{ vars.PUBLIC_SALES_EMAIL }}
PUBLIC_AUTH_SIGNIN_URL: ${{ secrets.PUBLIC_AUTH_SIGNIN_URL }}
PUBLIC_AUTH_SIGNUP_URL: ${{ secrets.PUBLIC_AUTH_SIGNUP_URL }}
PUBLIC_SALES_EMAIL: ${{ secrets.PUBLIC_SALES_EMAIL }}
steps:
- uses: actions/checkout@v4
@@ -53,33 +54,23 @@ jobs:
- name: Build site
run: npm run build
# Astro/Vite does not copy dotfiles from public/ into dist/, so .htaccess
# never reaches the deployed origin and Apache never sees the security
# headers it sets. Copy it explicitly. Fail if the source is missing
# rather than silently shipping a header-less site.
- name: Copy .htaccess into dist
run: |
test -f public/.htaccess
cp public/.htaccess dist/.htaccess
- name: Guard — no TBD markers may ship in built HTML
run: |
if grep -rl 'TBD:' dist 2>/dev/null | grep -E '\.(html|svg)$'; then
echo "Built output contains unfilled <TBD:...> markers."
if grep -rlE '(TBD):' dist 2>/dev/null | grep -E '\.(html|svg)$'; then
echo "Built output contains unfilled <TBD:...>) markers."
echo "Fill in imprint.astro and privacy.astro operator fields before merging to main."
exit 1
fi
- name: Upload dist artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
retention-days: 7
deploy:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Download dist artifact
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Configure SSH
env:
SFTP_KEY: ${{ secrets.SFTP_KEY }}
@@ -111,8 +102,14 @@ jobs:
: "${SFTP_USER:?SFTP_USER secret must be set}"
: "${SFTP_HOST:?SFTP_HOST secret must be set}"
: "${SFTP_PATH:?SFTP_PATH secret must be set}"
rsync -avz --delete \
-e "ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=~/.ssh/known_hosts" \
# Hetzner Webhosting splits SSH into two ports:
# port 22 — SFTP only, no remote command exec
# port 222 — full SSH with shell exec (rsync needs this)
# `--rsync-path=/usr/bin/rsync` tells the local rsync where to find
# the remote binary on Hetzner's locked-down PATH.
# `BatchMode=yes` disables interactive prompts.
rsync -avz --delete --rsync-path=/usr/bin/rsync \
-e "ssh -p 222 -i $HOME/.ssh/id_ed25519 -o BatchMode=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile=$HOME/.ssh/known_hosts" \
dist/ "$SFTP_USER@$SFTP_HOST:$SFTP_PATH/"
- name: Post-deploy smoke test

View File

@@ -70,11 +70,15 @@ Add these under Repository settings → Actions → Secrets (or variables):
| `SFTP_PATH` | secret | Absolute path to document root (e.g., `/usr/home/cameleer/public_html/www.cameleer.io`) |
| `SFTP_KEY` | secret | Contents of `~/.ssh/cameleer-website-deploy` (private key, PEM) |
| `SFTP_KNOWN_HOSTS` | secret | Contents of `hetzner-known-hosts.txt` (captured via `ssh-keyscan`) |
| `PUBLIC_AUTH_SIGNIN_URL` | variable | `https://auth.cameleer.io/sign-in` |
| `PUBLIC_AUTH_SIGNUP_URL` | variable | `https://auth.cameleer.io/sign-in?first_screen=register` |
| `PUBLIC_SALES_EMAIL` | variable | `sales@cameleer.io` (or whatever sales alias you set up) |
| `PUBLIC_AUTH_SIGNIN_URL` | secret | `https://auth.cameleer.io/sign-in` |
| `PUBLIC_AUTH_SIGNUP_URL` | secret | `https://auth.cameleer.io/sign-in?first_screen=register` |
| `PUBLIC_SALES_EMAIL` | secret | `sales@cameleer.io` (or whatever sales alias you set up) |
## 4. Content TBD — before go-live
These three are not actually secret (they end up in the built HTML), but Gitea's
Actions UI puts them in the **Secrets** tab alongside the SFTP credentials. The
workflows read them via the `${{ secrets.* }}` context.
## 4. Content TODO — before go-live
- [ ] Fill in `src/pages/imprint.astro` `operator` object with real legal details.
- [ ] Fill in `operatorContact` in `src/pages/privacy.astro`.

View File

@@ -4,18 +4,18 @@ import SiteHeader from '../components/SiteHeader.astro';
import SiteFooter from '../components/SiteFooter.astro';
// Imprint (Impressum) per TMG §5 / DDG §5.
// Values prefixed "<TBD:" MUST be replaced with real operator data before go-live.
// Values prefixed "<TODO:" MUST be replaced with real operator data before go-live.
// See docs/superpowers/specs/2026-04-24-cameleer-website-design.md §6.4.
const operator = {
legalName: '<TBD: legal name of operating entity>',
streetAddress: '<TBD: street and number>',
postalCity: '<TBD: postal code and city>',
legalName: '<TODO:legal name of operating entity>',
streetAddress: '<TODO:street and number>',
postalCity: '<TODO:postal code and city>',
country: 'Germany',
email: '<TBD: contact email>',
phone: '<TBD: phone (optional but recommended)>',
vatId: '<TBD: VAT ID per §27a UStG, or "not applicable">',
registerEntry: '<TBD: commercial register + court, or "not applicable">',
responsibleForContent: '<TBD: responsible party per §18 Abs. 2 MStV>',
email: '<TODO:contact email>',
phone: '<TODO:phone (optional but recommended)>',
vatId: '<TODO:VAT ID per §27a UStG, or "not applicable">',
registerEntry: '<TODO:commercial register + court, or "not applicable">',
responsibleForContent: '<TODO:responsible party per §18 Abs. 2 MStV>',
};
---
<BaseLayout

View File

@@ -3,7 +3,7 @@ import BaseLayout from '../layouts/BaseLayout.astro';
import SiteHeader from '../components/SiteHeader.astro';
import SiteFooter from '../components/SiteFooter.astro';
const operatorContact = '<TBD: controller contact email (same as imprint)>';
const operatorContact = '<TODO:controller contact email (same as imprint)>';
const lastUpdated = '2026-04-24';
---
<BaseLayout

View File

@@ -25,7 +25,7 @@ export default {
text: {
DEFAULT: '#e8eaed',
muted: '#9aa3b2',
faint: '#6b7280',
faint: '#828b9b',
},
},
fontFamily: {