diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index b51e69d..b403634 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -37,12 +37,7 @@ jobs: sudo podman build \ --no-cache \ --build-arg WEBMENTION_TOKEN="${{ secrets.WEBMENTION_TOKEN }}" \ - -t localhost/adrian-altner.de:latest . 2>&1 | tee /tmp/podman-build.log - echo "--- token-len check ---" - grep 'token-len=' /tmp/podman-build.log || echo "(no token-len in build output)" - echo "--- webmentions check ---" - sudo podman run --rm localhost/adrian-altner.de:latest sh -c \ - 'grep -c "section class=\"webmentions\"" /app/dist/client/setting-up-forgejo-actions-runner/index.html 2>/dev/null && echo WEBMENTIONS_OK || echo WEBMENTIONS_MISSING' + -t localhost/adrian-altner.de:latest . - name: Restart service run: sudo systemctl restart podman-compose@adrian-altner.de.service diff --git a/astro.config.mjs b/astro.config.mjs index 0256134..27c9723 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -10,7 +10,6 @@ import node from '@astrojs/node'; const envMode = process.env.NODE_ENV === 'production' ? 'production' : 'development'; const envVars = loadEnv(envMode, process.cwd(), ''); const WEBMENTION_TOKEN = envVars.WEBMENTION_TOKEN || process.env.WEBMENTION_TOKEN || ''; -console.log(`[astro.config] token-len=${WEBMENTION_TOKEN.length} envVars-len=${(envVars.WEBMENTION_TOKEN||'').length} proc-len=${(process.env.WEBMENTION_TOKEN||'').length}`); // https://astro.build/config export default defineConfig({ diff --git a/compose.yml b/compose.yml index 9787d63..1056761 100644 --- a/compose.yml +++ b/compose.yml @@ -2,9 +2,6 @@ name: adrian-altner-de services: website: - build: - context: . - dockerfile: Containerfile image: localhost/adrian-altner.de:latest container_name: adrian-altner.de ports: diff --git a/src/components/Webmentions.astro b/src/components/Webmentions.astro index ac2014c..5d0f588 100644 --- a/src/components/Webmentions.astro +++ b/src/components/Webmentions.astro @@ -8,7 +8,6 @@ declare global { } const tokenRaw = (globalThis as unknown as { __WEBMENTION_TOKEN__?: string }).__WEBMENTION_TOKEN__; const WEBMENTION_TOKEN = typeof tokenRaw === 'string' ? tokenRaw : ''; -console.log(`[Webmentions] tokenRaw type=${typeof tokenRaw} len=${WEBMENTION_TOKEN.length} raw="${String(tokenRaw).slice(0,4)}..."`); interface WMAuthor { name?: string; @@ -43,10 +42,8 @@ async function fetchMentions(target: string): Promise { url.searchParams.set('token', token); url.searchParams.set('per-page', '100'); const res = await fetch(url); - console.log(`[Webmentions] fetch ${t.slice(-40)} → ${res.status}`); if (!res.ok) return [] as WMEntry[]; const json = (await res.json()) as { children?: WMEntry[] }; - console.log(`[Webmentions] children=${json.children?.length ?? 0}`); return json.children ?? []; }; const [a, b] = await Promise.all([fetchOne(withSlash), fetchOne(withoutSlash)]);