Skip to content

Commit 3b4c9b2

Browse files
authored
[Docs Site] Move show-changed-files to bin and fix workflow condition (cloudflare#19784)
1 parent aefdd2f commit 3b4c9b2

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

wrangler.toml

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,49 @@
11
#:schema ./node_modules/wrangler/config-schema.json
2+
3+
# ===============================
4+
# 🌐 THÔNG TIN CƠ BẢN
5+
# ===============================
26
name = "cloudflare-docs"
37
account_id = "b54f07a6c269ecca2fa60f1ae4920c99"
4-
compatibility_date = "2024-10-14"
5-
compatibility_flags = ["nodejs_compat"]
68
main = "./worker/index.ts"
79

8-
workers_dev = true
10+
# ===============================
11+
# ⚙️ CẤU HÌNH MÔI TRƯỜNG
12+
# ===============================
13+
compatibility_date = "2024-01-29"
14+
compatibility_flags = ["nodejs_compat"]
15+
workers_dev = true # true = test trên .workers.dev, false = deploy domain thật
16+
17+
# ===============================
18+
# 🌍 ROUTE – DOMAIN TRIỂN KHAI
19+
# ===============================
920
route = { pattern = "developers.cloudflare.com/*", zone_name = "developers.cloudflare.com" }
1021

22+
# ===============================
23+
# 📦 QUY TẮC XỬ LÝ FILE
24+
# ===============================
1125
rules = [
12-
{ type = "Text", globs = ["**/__redirects"], fallthrough = true },
26+
{ type = "Text", globs = ["**/__redirects"], fallthrough = true },
1327
]
1428

29+
# ===============================
30+
# 🧱 ASSETS – PHỤC VỤ WEBSITE TĨNH
31+
# ===============================
1532
[assets]
16-
directory = "./dist"
17-
binding = "ASSETS"
18-
not_found_handling = "404-page"
19-
run_worker_first = true
33+
directory = "./dist" # Thư mục chứa file build sẵn (HTML, CSS, JS)
34+
binding = "ASSETS" # Biến truy cập trong code: env.ASSETS
35+
not_found_handling = "404-page" # Trang 404 tùy chỉnh
36+
run_worker_first = true # Worker xử lý logic trước khi trả file tĩnh
2037

38+
# ===============================
39+
# ☁️ R2 BUCKET – LƯU TRỮ DỮ LIỆU
40+
# ===============================
2141
[[r2_buckets]]
22-
binding = "VENDORED_MARKDOWN"
23-
bucket_name = "vendored-markdown"
42+
binding = "VENDORED_MARKDOWN" # Biến truy cập trong code: env.VENDORED_MARKDOWN
43+
bucket_name = "vendored-markdown" # Tên bucket R2 thật trên Cloudflare
2444

45+
# ===============================
46+
# 📊 GIÁM SÁT & LOG
47+
# ===============================
2548
[observability]
2649
enabled = true

0 commit comments

Comments
 (0)