Skip to content

Commit f6e0060

Browse files
authored
Merge pull request #25 from nightt5879/nightt5879/cloudflare-git-build-1.3.4
fix: pin Cloudflare Pages build runtime for 1.3.4
2 parents 0fae80b + 9ef3519 commit f6e0060

8 files changed

Lines changed: 60 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Node
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: 20
19+
node-version-file: .node-version
2020
cache: npm
2121

2222
- name: Install dependencies

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.16.0

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
## [1.3.4] - 2026-05-03
8+
9+
### Added
10+
- Added a root `.node-version` file so Cloudflare Pages Git builds and GitHub Actions use the same pinned Node.js runtime.
11+
- Added a root `wrangler.jsonc` Pages configuration that records the `doubleducklab` project and `dist` build output directory.
12+
- Documented the expected Cloudflare Pages Git build settings for the production CMS site.
13+
14+
### Changed
15+
- Bumped the package version from `1.3.3` to `1.3.4` for Cloudflare Git build stability.
16+
- Updated GitHub Actions to read the pinned Node.js version from `.node-version`.
17+
18+
### Fixed
19+
- Reduced production deploy drift between GitHub CI, local builds, manual Wrangler uploads, and Cloudflare Pages Git builds.
20+
721
## [1.3.3] - 2026-05-03
822

923
### Changed

README_EN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ venue: "Conference Name"
211211
- Content map: [content-map.md](./content-map.md)
212212
- Content edit guide: [docs/content-edit-guide.md](./docs/content-edit-guide.md)
213213
- Content ops checklist: [docs/content-ops-checklist.md](./docs/content-ops-checklist.md)
214+
- Cloudflare Pages build settings: [docs/cloudflare-pages-build-settings.md](./docs/cloudflare-pages-build-settings.md)
214215
- Release baseline checklist: [docs/release-baseline-checklist.md](./docs/release-baseline-checklist.md)
215216
- Roadmap: [docs/roadmap.md](./docs/roadmap.md)
216217

@@ -226,6 +227,7 @@ venue: "Conference Name"
226227
- `1.3.1`: CMS live enablement follow-up with a Cloudflare Worker OAuth proxy package and production environment validation notes
227228
- `1.3.2`: CMS stability patch that adds stable legacy news slugs, removes CMS test residue, and tightens news slug validation
228229
- `1.3.3`: build-log cleanup that clears Astro content cache before builds to remove duplicate news id warnings
230+
- `1.3.4`: Cloudflare Pages Git build stability patch that pins Node.js and records the Pages output directory in repo config
229231

230232
## License
231233

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Cloudflare Pages Build Settings
2+
3+
Use these settings for the `doubleducklab` Pages project when GitHub is connected directly to Cloudflare Pages.
4+
5+
## Build Settings
6+
7+
- Production branch: `main`
8+
- Build command: `npm run build`
9+
- Build output directory: `dist`
10+
- Node.js version: `22.16.0`
11+
12+
The repository pins the Node.js version in `.node-version`, and the Pages project also has `NODE_VERSION=22.16.0` set for production builds. This keeps GitHub Actions, local release builds, manual Wrangler uploads, and Cloudflare Pages Git builds on the same runtime family.
13+
14+
## Required Production Variables
15+
16+
- `CMS_GITHUB_REPO=nightt5879/DoubleDuckLab`
17+
- `CMS_BRANCH=main`
18+
- `CMS_OAUTH_BASE_URL=https://doubleducklab-cms-oauth.<account>.workers.dev`
19+
- `PUBLIC_SITE_URL=https://doubleducklab.pages.dev`
20+
21+
`NODE_VERSION` is a build-environment pin, not a CMS secret. It is listed with Pages secrets only because Wrangler manages Pages variables through `wrangler pages secret`.
22+
23+
## Verification
24+
25+
After merging a deployment-config change:
26+
27+
1. Check that Cloudflare Pages creates a production Git deployment for the merge commit.
28+
2. Confirm the production deployment succeeds without needing a manual `wrangler pages deploy`.
29+
3. Visit `/admin/config.yml` and confirm it is the enabled CMS config, not the setup-required fallback.
30+
4. Visit `/news/` and `/en/news/` to confirm public routes still build normally.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "double-duck-lab",
33
"type": "module",
4-
"version": "1.3.3",
4+
"version": "1.3.4",
55
"private": true,
66
"scripts": {
77
"dev": "astro dev",

wrangler.jsonc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "doubleducklab",
3+
"pages_build_output_dir": "dist",
4+
"compatibility_date": "2026-05-03",
5+
"env": {
6+
"production": {},
7+
"preview": {}
8+
}
9+
}

0 commit comments

Comments
 (0)