Add Cloudflare Pages deploy script

This commit is contained in:
2026-06-25 02:49:15 +09:00
parent a2a6dee025
commit d8af980f7d
3 changed files with 1484 additions and 2 deletions
+20
View File
@@ -65,6 +65,26 @@ cd site/decodal-site
npm run dev
```
Deploy the static site to Cloudflare Pages with Wrangler direct upload:
```sh
cd site/decodal-site
npm run deploy
```
The deploy script runs `npm run build` and then uploads `dist/` to the Pages project named `decodal-site`.
Use `CLOUDFLARE_PROJECT_NAME` when deploying to a differently named Pages project.
```sh
CLOUDFLARE_PROJECT_NAME=my-pages-project npm run deploy
```
If the committed WASM package must be regenerated before deploy, use:
```sh
npm run deploy:wasm
```
## Tree-sitter grammar
The Tree-sitter grammar is kept in: