From a33a3fc42e70b7faf42cb58fdff4f455fcc0c314 Mon Sep 17 00:00:00 2001 From: Elvis020 Date: Sat, 1 Aug 2026 10:36:57 +0000 Subject: [PATCH] fix: harden Cloudflare builds and meetup refreshes - Declare the repository root as the sole pnpm workspace package so Cloudflare Workers Builds can install dependencies with pnpm 10.11.1. - Cache Astro's fingerprinted assets for one year with immutable browser semantics while leaving HTML on Cloudflare's default revalidation policy. - Refresh the static meetup snapshot every day at 06:17 UTC through the existing GitHub Pages and Cloudflare workflows. Verification: clean frozen installs with pnpm 10.11.1 and 10.24.0; production build loaded 9 live meetups and generated 11 pages; generated dist/_headers matched the source rule; Wrangler 4.115.0 deployment dry run passed; workflow schedules and git diff checks passed. --- .github/workflows/deploy-cloudflare-workers.yml | 2 +- .github/workflows/deploy.yml | 2 +- pnpm-workspace.yaml | 3 +++ public/_headers | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 public/_headers diff --git a/.github/workflows/deploy-cloudflare-workers.yml b/.github/workflows/deploy-cloudflare-workers.yml index 208a73b..8196180 100644 --- a/.github/workflows/deploy-cloudflare-workers.yml +++ b/.github/workflows/deploy-cloudflare-workers.yml @@ -9,7 +9,7 @@ on: - main workflow_dispatch: schedule: - - cron: '0 6 * * 1,4' + - cron: '17 6 * * *' permissions: contents: read diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 876af90..1518424 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,7 +9,7 @@ on: - main workflow_dispatch: schedule: - - cron: '0 6 * * 1,4' + - cron: '17 6 * * *' permissions: contents: read diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 14018f5..c7990fa 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,6 @@ +packages: + - "." + allowBuilds: esbuild: true sharp: true diff --git a/public/_headers b/public/_headers new file mode 100644 index 0000000..ed88e9a --- /dev/null +++ b/public/_headers @@ -0,0 +1,2 @@ +/_astro/* + Cache-Control: public, max-age=31536000, immutable