Deploys to test without waiting for Lighthouse
Test exists to try things out, so it now deploys as soon as the check job passes; Lighthouse runs alongside and its reports are information. Production still waits for both check and Lighthouse, so accessibility, best-practices and SEO problems never go live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -157,8 +157,10 @@ jobs:
|
|||||||
path: web/lighthouse-reports/
|
path: web/lighthouse-reports/
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
||||||
|
# Test wacht niet op Lighthouse: test is om te testen, de rapporten zie je
|
||||||
|
# achteraf. Lighthouse draait ernaast.
|
||||||
deploy-test:
|
deploy-test:
|
||||||
needs: [check, lighthouse]
|
needs: check
|
||||||
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_test == 'true') || (github.event_name == 'push' && github.ref == 'refs/heads/master')
|
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_test == 'true') || (github.event_name == 'push' && github.ref == 'refs/heads/master')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -206,6 +208,8 @@ jobs:
|
|||||||
curl -fsSI "$HEALTH_URL" | grep -qi '^content-security-policy:'
|
curl -fsSI "$HEALTH_URL" | grep -qi '^content-security-policy:'
|
||||||
echo "Test bereikbaar met security headers"
|
echo "Test bereikbaar met security headers"
|
||||||
|
|
||||||
|
# Productie wacht wel op Lighthouse: toegankelijkheid, Best Practices en SEO
|
||||||
|
# moeten slagen voordat er iets live gaat.
|
||||||
deploy-production:
|
deploy-production:
|
||||||
needs: [check, lighthouse]
|
needs: [check, lighthouse]
|
||||||
# Alleen handmatig, en alleen vanaf een release-branch
|
# Alleen handmatig, en alleen vanaf een release-branch
|
||||||
|
|||||||
@@ -702,3 +702,39 @@ Verder heb ik de vraag ook beantwoord"
|
|||||||
**Context**: OPERATIONS - Deployment Setup; fixing CI
|
**Context**: OPERATIONS - Deployment Setup; fixing CI
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Deployment Setup - PR Green and Merged
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-18T23:42:04Z
|
||||||
|
|
||||||
|
**User Input**: "(none — monitoring as authorised)"
|
||||||
|
|
||||||
|
**AI Response**: "Run 530 (PR #3, 23f7020): check and lighthouse succeeded. PR #3 auto-merged by the owner (merge commit fccc909). Run 531 (push to master) started with deploy-test; watching it."
|
||||||
|
|
||||||
|
**Context**: OPERATIONS - Deployment Setup; watching first master run
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Deployment Setup - First Master Run 531
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T00:01:36Z
|
||||||
|
|
||||||
|
**User Input**: "(none — monitoring as authorised)"
|
||||||
|
|
||||||
|
**AI Response**: "Run 531 (push to master, fccc909): check and lighthouse succeeded; deploy-test reached the Pi (SSH login with secrets OK, WordPress guard passed) but failed on 'mkdir: cannot create directory /var/www/html/andreaslop-test: Permission denied'. Cause: folder missing and /var/www/html owned by root (deployment-instructions 1.2.1 not yet done). Not solved with sudo in the pipeline (would widen deploy-user rights). Asked owner to create and chown the folder once, then re-run."
|
||||||
|
|
||||||
|
**Context**: OPERATIONS - Deployment Setup; awaiting owner action on the Pi
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Deployment Setup - Lighthouse After Test Deploy
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T07:01:45Z
|
||||||
|
|
||||||
|
**User Input**: "Ja, voer maar door, maar wacht met een PR maken totdat de huidige run de deploy-test job heeft afgerond. Ik heb voor PR's bewust alleen de check job aangegeven omdat ik dacht dat lighthouse vooral belangrijk is voor productie om te blokkeren en voor test is het info waar je eventueel op kan reageren als je het lokaal vergeten bent bijvoorbeeld. Voor nu hoeft het niet als check voor mergen naar master."
|
||||||
|
|
||||||
|
**AI Response**: "Owner re-ran run 531 after creating the test folder via a symlink (/var/www/html -> /mnt/storage1/www/html; explained symlink permissions are ignored, target folder rights count). Fast-forwarded feature/frontend-shell to master (fccc909). Workflow: deploy-test now needs only check (Lighthouse runs alongside as information); deploy-production still needs check and lighthouse. Deployment plan D6 updated incl. branch protection (only check required, Lighthouse deliberately not). Pushing to the feature branch; PR to be created after run 531's deploy-test finishes."
|
||||||
|
|
||||||
|
**Context**: OPERATIONS - Deployment Setup
|
||||||
|
|
||||||
|
---
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Text alternative: feature branches go through a pull request with CI into master
|
|||||||
| D3 | **Environments**: test and production. | Q5 = B |
|
| D3 | **Environments**: test and production. | Q5 = B |
|
||||||
| D4 | **Test deploy**: automatically on every push to `master` (incl. a merged PR), and manually from any branch with "Deploy to Test", for example to try a branch before merging. | Q6 = B, CQ1 |
|
| D4 | **Test deploy**: automatically on every push to `master` (incl. a merged PR), and manually from any branch with "Deploy to Test", for example to try a branch before merging. | Q6 = B, CQ1 |
|
||||||
| D5 | **Production deploy**: manual only ("Deploy to Production"), and only from a `release/*` branch; the workflow refuses other branches. | Q6 = B, CQ1 |
|
| D5 | **Production deploy**: manual only ("Deploy to Production"), and only from a `release/*` branch; the workflow refuses other branches. | Q6 = B, CQ1 |
|
||||||
| D6 | **Quality gate**: every run does lint, format, tests, build, audit and Lighthouse (mobile + desktop) before any deploy job can start. In CI, Lighthouse **Performance is report-only** (the Pi runner gives scores 30-40 points too low); accessibility, best practices and SEO block. Performance blocks in `pnpm check` on a PC. HTML reports are attached to every run as the `lighthouse-reports` artifact. | Q7 = A; Lighthouse CI question A |
|
| D6 | **Quality gate**: every run does lint, format, tests, build and audit (`check`) before any deploy. **Test deploys right after `check`**, and Lighthouse (mobile + desktop) runs alongside as information. **Production waits for both `check` and Lighthouse.** Branch protection on `master` requires only `check`; Lighthouse is deliberately not a merge requirement. In CI, Lighthouse **Performance is report-only** (the Pi runner gives scores 30-40 points too low); accessibility, best practices and SEO block. Performance blocks in `pnpm check` on a PC. HTML reports are attached to every run as the `lighthouse-reports` artifact. | Q7 = A; Lighthouse CI question A |
|
||||||
| D7 | **Chrome for Lighthouse**: Playwright's Chromium (supports linux-arm64), installed in the job with a pinned Playwright version. Not the browser on the host: jobs run in containers and cannot see it. | CQ5 |
|
| D7 | **Chrome for Lighthouse**: Playwright's Chromium (supports linux-arm64), installed in the job with a pinned Playwright version. Not the browser on the host: jobs run in containers and cannot see it. | CQ5 |
|
||||||
| D8 | **Test target**: Raspberry Pi with nginx behind the reverse-proxy Pi, **next to the current WordPress site**. Deploy over SSH (`sshpass` + `scp`, same secrets as your other projects). Simple: empty the test folder, then copy the new build in; no old versions are kept. The step refuses an empty path, `/`, or a folder containing WordPress (`wp-config.php` / `wp-content`). The nginx block has its own `server_name` and never `default_server`. | CQ4 = B; owner: simpler than other apps, must not conflict with WordPress |
|
| D8 | **Test target**: Raspberry Pi with nginx behind the reverse-proxy Pi, **next to the current WordPress site**. Deploy over SSH (`sshpass` + `scp`, same secrets as your other projects). Simple: empty the test folder, then copy the new build in; no old versions are kept. The step refuses an empty path, `/`, or a folder containing WordPress (`wp-config.php` / `wp-content`). The nginx block has its own `server_name` and never `default_server`. | CQ4 = B; owner: simpler than other apps, must not conflict with WordPress |
|
||||||
| D9 | **Test is never indexed**: `X-Robots-Tag: noindex, nofollow` and a `robots.txt` that disallows everything. | Derived |
|
| D9 | **Test is never indexed**: `X-Robots-Tag: noindex, nofollow` and a `robots.txt` that disallows everything. | Derived |
|
||||||
|
|||||||
Reference in New Issue
Block a user