Skip to content

Commit 04c17fe

Browse files
authored
CLDR-19211 site: pages to workers (#5300)
1 parent 13d6db6 commit 04c17fe

File tree

4 files changed

+31
-6
lines changed

4 files changed

+31
-6
lines changed

.github/workflows/site.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,8 @@ jobs:
3434
with:
3535
ruby-version: 3.2
3636
bundler-cache: true
37-
- name: Setup Jekyll
38-
run: 'gem install bundler jekyll kramdown-parser-gfm webrick'
39-
- name: Setup assets
40-
run: 'cd docs/site/assets && npm ci && npm run build'
41-
- name: Build cldr.pages.dev
42-
run: 'cd docs/site && jekyll build'
37+
- name: Build Site
38+
run: 'sh tools/scripts/web/build-site.sh'
4339
- name: Pre-install Wrangler
4440
if: (github.event_name == 'push') || (github.event.pull_request.head.repo.full_name == 'unicode-org/cldr')
4541
run: npm i -g wrangler@3.x

tools/scripts/web/build-site.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
set -x
4+
5+
gem install bundler jekyll kramdown-parser-gfm webrick && \
6+
cd docs/site/assets && \
7+
npm ci && \
8+
npm run build && \
9+
cd .. && \
10+
jekyll build || exit 1
11+
12+
echo 'Output in ./_site'

tools/scripts/web/docker/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@
1515

1616
1. `docker compose run -w /src site jekyll build`
1717
2. output is in `./_site` here in this dir.
18+
19+
## Production Build
20+
21+
Cloudflare runs `sh tools/scripts/web/build-site.sh` from the repo root.
22+
23+

wrangler.jsonc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "cldr-next",
3+
"$schema": "https://unpkg.com/wrangler/config-schema.json",
4+
"compatibility_date": "2026-01-20",
5+
"assets": {
6+
"directory": "./_site/",
7+
"not_found_handling": "404-page"
8+
},
9+
"preview_urls": true,
10+
"workers_dev": true
11+
}

0 commit comments

Comments
 (0)