Prepares the test site for the CMS host

The test route on the proxy Pi now points at the CMS host on port 5200.
verify-deployment.sh gets a --cms mode that checks the exact security
headers, caching, gzip only, a percent-encoded redirect, the 405 for
POST, and the CMS routes. The deploy-test job uses it once the Gitea
variable ASF_TEST_SERVED_BY_CMS is true.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-08 02:05:59 +01:00
co-authored by Claude Sonnet 5.5
parent 16b75af4d4
commit 41a6e7be5a
7 changed files with 216 additions and 24 deletions
+14 -1
View File
@@ -113,6 +113,11 @@ jobs:
steps:
- uses: actions/checkout@v4
# Voor config/printCsp.ts (de exacte CSP in de controle na deploy)
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Download build artifact
uses: actions/download-artifact@v3
with:
@@ -161,9 +166,17 @@ jobs:
- name: Controle na deploy
env:
HEALTH_URL: ${{ vars.HEALTH_CHECK_URL_TEST }}
# 'true' zodra test.andreaslop.nl door de CMS-host (Api.AndreaSlopFotografie)
# wordt bediend in plaats van nginx: dan controleert het script ook de
# exacte CSP en de CMS-routes. Zet hem om samen met de proxy-route.
SERVED_BY_CMS: ${{ vars.ASF_TEST_SERVED_BY_CMS }}
run: |
if [ -z "$HEALTH_URL" ]; then echo "Geen HEALTH_CHECK_URL_TEST ingesteld; overgeslagen"; exit 0; fi
bash deploy/verify-deployment.sh "$HEALTH_URL" dist --test
if [ "$SERVED_BY_CMS" = "true" ]; then
EXPECTED_CSP="$(node config/printCsp.ts)" bash deploy/verify-deployment.sh "$HEALTH_URL" dist --test --cms
else
bash deploy/verify-deployment.sh "$HEALTH_URL" dist --test
fi
echo "Test bereikbaar en gelijk aan de build"
# Lighthouse tegen de gebouwde site (mobiel en desktop)