feat(static-sites): let project sites declare Bunny edge rules
All checks were successful
Test / test (push) Successful in 6s

Project sites can pass a TOML file of edge rules (redirects, status
codes, blocking, response headers, cache times) to the deploy action.
The gateway validates them when a deployment starts and reconciles its
own rules on the site's Pull Zones when it finalizes, deleting dropped
rules and purging when a rule changed. Actions that could reach beyond
the site, such as origin changes, are not available.

The purge retry is limited to recorded purge failures, so a deployment
whose rules failed to apply cannot be completed by a purge alone.
This commit is contained in:
Eric Wendland 2026-10-02 17:14:42 +02:00
commit 4490557f13
4 changed files with 263 additions and 9 deletions

View file

@ -17,6 +17,13 @@ inputs:
description: Optional trusted Gandalf deployment gateway base URL.
required: false
default: ""
edge-rules:
description: >-
Optional TOML file with [[edge_rules]] (redirects, status codes, headers,
cache times) for the site's Pull Zones. Needs purge-endpoint. Through the
gateway, leaving it empty removes rules from earlier deployments.
required: false
default: ""
dry-run:
description: Report changes without uploading or deleting files.
required: false
@ -39,6 +46,7 @@ runs:
STATIC_SITE_REVISION: ${{ github.sha }}
STATIC_SITE_DRY_RUN: ${{ inputs.dry-run }}
STATIC_SITE_WORKERS: ${{ inputs.workers }}
STATIC_SITE_EDGE_RULES: ${{ inputs.edge-rules }}
run: |
set -euo pipefail
args=(bunny "$STATIC_SITE_DIRECTORY" --workers "$STATIC_SITE_WORKERS")