Remove the nightly test build
Continuous Integration / check (push) Successful in 2m44s
Continuous Integration / build-test (push) Successful in 1m2s
Continuous Integration / lighthouse (push) Successful in 9m31s
Continuous Integration / deploy-production (push) Skipped
Continuous Integration / deploy-test (push) Successful in 1m26s

This commit was merged in pull request #20.
This commit is contained in:
2026-11-17 08:46:01 +01:00
5 changed files with 19 additions and 23 deletions
+2 -10
View File
@@ -3,7 +3,6 @@ name: Continuous Integration
# Branchstrategie (zie aidlc-docs/.../operations/deployment/deployment-plan.md):
# - Pull request → controles, geen deploy
# - Merge/push naar master → controles + automatisch naar test
# - Elke nacht (schedule) → controles + naar test, met de pakketten uit het CMS
# - Handmatig, elke branch → controles + naar test als 'Deploy to Test' aan staat
# - Handmatig, release/* → controles + naar productie als 'Deploy to Production' aan staat
on:
@@ -21,12 +20,6 @@ on:
types: [opened, synchronize, reopened]
push:
branches: [master]
# Elke nacht een testbuild, zodat een wijziging van de pakketten in het CMS
# op de testsite komt (de build haalt ze op). Alleen test, nooit productie.
# 03:15 UTC (04:15 of 05:15 Nederlandse tijd), buiten kantooruren en niet op
# een heel uur. Gitea draait schedules alleen vanaf de standaardbranch.
schedule:
- cron: '15 3 * * *'
# Alleen bij pull requests een verouderde run afbreken; een deploy wordt nooit
# halverwege gestopt.
@@ -118,7 +111,7 @@ jobs:
# dist met de gecommitte lijst tot er een productie-CMS is.
build-test:
needs: check
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_test == 'true') || (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'schedule'
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_test == 'true') || (github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on: linux
steps:
- uses: actions/checkout@v4
@@ -173,7 +166,7 @@ jobs:
# actions werken niet op Podman.
deploy-test:
needs: [check, build-test]
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_test == 'true') || (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'schedule'
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_test == 'true') || (github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on: raspberry-pi
steps:
- uses: actions/checkout@v4
@@ -247,7 +240,6 @@ jobs:
# Lighthouse tegen de gebouwde site (mobiel en desktop)
lighthouse:
needs: check
if: github.event_name != 'schedule'
runs-on: linux
steps:
- uses: actions/checkout@v4
+1 -1
View File
@@ -29,7 +29,7 @@ Lay-out of the website and its pages can be found in a separate document [LAYOUT
## Documentation
- [docs/cms-integration.md](docs/cms-integration.md): packages and banners from the CMS, the API, the build step, live refresh and the reverse proxy.
- [docs/deploy-and-ci.md](docs/deploy-and-ci.md): the pipeline, the workflow inputs, deploying to test, the nightly build and the contact form switch.
- [docs/deploy-and-ci.md](docs/deploy-and-ci.md): the pipeline, the workflow inputs, deploying to test, the contact form switch.
- [docs/assets-and-licenses.md](docs/assets-and-licenses.md): where the images, icons and fonts come from and what is still to confirm about their licence.
- [docs/translations.md](docs/translations.md): where the texts of the site live (language files), how keys work and how a language is added.
- [docs/go-live-checklist.md](docs/go-live-checklist.md): what must be true before the CMS features and the contact form go to production.
+3 -3
View File
@@ -11,10 +11,10 @@ Source: `GET /api/v1/offerings`. One list feeds the price cards on the home page
- **Where the data comes from, in order:**
1. At build time `web/config/fetchOfferings.ts` (the first step of `pnpm build`) asks `OFFERINGS_URL` (10 s timeout, 2 attempts) and writes the gitignored `web/src/content/offerings.generated.json`. The packages are baked into the prerendered HTML (search engines see the prices, no layout jump).
2. Without `OFFERINGS_URL`, with a CMS that is down or with an unusable answer, the committed `web/src/content/offerings.snapshot.json` is used. The build never fails and never shows empty prices; the log says which source was used. Tests always use the snapshot.
3. After hydration `PackagesProvider` (`web/src/components/PackagesProvider/`) asks the CMS once and replaces the baked list only if the answer differs. A network error, time-out (8 s), bad status or invalid answer keeps what was baked. A change in the CMS therefore shows at once; the nightly build only matters for search engines.
3. After hydration `PackagesProvider` (`web/src/components/PackagesProvider/`) asks the CMS once and replaces the baked list only if the answer differs. A network error, time-out (8 s), bad status or invalid answer keeps what was baked. A change in the CMS therefore shows at once. Where the CMS host serves the site (ASF-test), it also writes the current data into the first HTML of every request (NFR-10), so search engines see it too and no rebuild is needed for content; a rebuild is only for code and design.
- **Featured package** (the star in the CMS admin, field `featured`): the card gets a heidegroen rule along its top, a heidegroen border and a small "Uitgelicht" tab on the top edge (`PriceCard`). The tab is positioned on the border, so the cards of a row keep the same layout. Any number of cards may be featured.
- **Description, price note and button label** (`description`, `priceNote`, `ctaLabel`) are optional in the CMS and the site does not use them: they are not shown and a card never depends on them (empty, `null` or absent all give the same card; covered by tests).
- **Scheduling in the CMS:** the API only returns packages that are live at the moment of the request (switched on and inside their from/to dates), so the site shows them and nothing else. The baked list reflects the moment of the build; the live refresh after hydration corrects it for every visitor, and the nightly build corrects it for search engines. A package that goes live or expires between two builds is therefore right in the browser but can be stale in the HTML until the next build.
- **Scheduling in the CMS:** the API only returns packages that are live at the moment of the request (switched on and inside their from/to dates), so the site shows them and nothing else. The baked list reflects the moment of the build; the live refresh after hydration corrects it for every visitor, and, behind the CMS host, the host injection corrects the HTML itself (cache 60 s, refreshed at once on a change). Without the host (production until the IIS pipeline is in place) a package that goes live or expires between two builds is right in the browser but can be stale in the HTML until the next build.
- **Keep the snapshot current** when the real packages change (prices, features), because production builds use it (see "Hosting" below).
## Banners (OfferingBanner)
@@ -30,7 +30,7 @@ Source: `GET /api/v1/offerings/banner?position=top|bottom`. No parameter means `
Both follow the same rules as the packages: baked into the HTML at build time, replaced live after hydration, empty fields are hidden, an error or invalid answer keeps what was baked. A `204` hides that banner (the one deliberate exception to "keep what was baked"); the two banners are independent of each other. Neither banner is a package: not in the form choices, not in the package count.
**Layout shift:** a banner that was not active at the last build is not in the HTML. When it appears live, the content below it moves down by its height once (for the top bar, the cards move). Rebuilding with the banner active (the nightly test build does this) removes the shift. The same holds in reverse when a baked banner is switched off.
**Layout shift:** a banner that was not active at the last build is not in the HTML. When it appears live, the content below it moves down by its height once (for the top bar, the cards move). Behind the CMS host the host injection writes the banner into the HTML, so there is no shift; without the host a rebuild with the banner active removes it. The same holds in reverse when a baked banner is switched off.
## Contact form
+13 -8
View File
@@ -4,13 +4,12 @@ Pipeline: [.gitea/workflows/continuous_integration.yaml](../.gitea/workflows/con
## Triggers
| Trigger | Result |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Pull request | Checks only, no deploy. |
| Push to `master` | Checks, then deploy to test. |
| Every night, 03:15 UTC (`schedule`) | Test build with the packages and banners from the test CMS, deploy to test, no Lighthouse. Gitea runs schedules only from the default branch, so this works after the packages feature is merged to `master`. Never production. |
| Manual (`workflow_dispatch`), any branch | Checks, and a deploy to test if `deploy_test` is on. |
| Manual from a `release/*` branch | Deploy to production if `deploy_production` is on. |
| Trigger | Result |
| ---------------------------------------- | ---------------------------------------------------- |
| Pull request | Checks only, no deploy. |
| Push to `master` | Checks, then deploy to test. |
| Manual (`workflow_dispatch`), any branch | Checks, and a deploy to test if `deploy_test` is on. |
| Manual from a `release/*` branch | Deploy to production if `deploy_production` is on. |
## Workflow inputs
@@ -24,7 +23,7 @@ Dispatch from the CLI (the token comes from your git credentials, never print it
1. `check`: lint, format, unit/property/axe tests (coverage threshold 100% on `src/lib/**`), build **without** `OFFERINGS_URL` (so with the committed snapshot), audit. Uploads artifact `dist` (this is what production gets).
2. `build-test`: builds again with `OFFERINGS_URL=${{ vars.ASF_OFFERINGS_URL_TEST }}` (packages and banners from the test CMS) and `VITE_SITE_URL=https://test.andreaslop.nl` (see "Own address of the test site") and uploads `dist-test`.
3. `deploy-test`: needs `check` and `build-test`, downloads `dist-test`, uploads to the ASF test host and runs the deployment check (served by the CMS host, admin files, POST status).
4. `lighthouse`: against the built site with the preview stub (`--audit-route --contact-stub`); skipped on `schedule`.
4. `lighthouse`: against the built site with the preview stub (`--audit-route --contact-stub`).
5. `deploy-production`: manual, from `release/*` only, uses artifact `dist`.
There is one Raspberry Pi runner plus a desktop runner, so jobs can wait in the queue for a long time (for example 30 minutes before `build-test`); a deploy that only just started is not hung. Check `started_at` (UTC) before cancelling anything.
@@ -48,3 +47,9 @@ The test site stands on its own: in the test build `VITE_SITE_URL` is `https://t
## Generated files
`web/deploy/iis/web.config` and `web/deploy/nginx/*.conf` are generated by `pnpm server-config` from `web/config/serverConfig.ts`. Change the generator, rerun it and commit the result; a test checks that they match.
## No nightly build (since the host injection)
There used to be a nightly test build (`schedule`, 03:15 UTC) that baked the CMS data into the HTML for search engines. It is gone: the CMS host writes the packages, banners and hero into the first HTML of every request (cache 60 s, refreshed at once on a change; NFR-10), so a content change is visible without a rebuild. A rebuild is only needed for code and design. The nightly run also put `master` over ASF-test every night, which would undo a feature branch deployed there.
The production site gets the same only when the ASF production site is served by the CMS host (the IIS pipeline, later; see [go-live-checklist.md](go-live-checklist.md)). Until then production shows the committed snapshot. The test build still sets `OFFERINGS_URL`; removing that (and `VITE_SITE_URL`) is a separate follow-up once host injection is confirmed end to end.
-1
View File
@@ -6,7 +6,6 @@ What must be true before the CMS-driven parts of the site go to production. Brya
- [x] The TEST ONLY commit `d449e76` is undone: the form is closed unless the build sets `VITE_CONTACT_FORM_ENABLED=true` (only the test build does; [deploy-and-ci.md](deploy-and-ci.md)).
- [ ] Merge: the CMS PR first, then `feature/asf-packages-cms` (which carries the contact-form commits).
- [ ] The nightly test build only starts after the packages feature is on `master` (schedules run from the default branch).
## Packages and banners