diff --git a/doc/manual/souce/development.md b/doc/manual/souce/development.md index 6354aa5..335c4b6 100644 --- a/doc/manual/souce/development.md +++ b/doc/manual/souce/development.md @@ -72,7 +72,8 @@ 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`. +The deploy script runs `npm run build` and then uploads `dist/` to the Pages project named `decodal-site` on branch `master`. +Cloudflare Pages treats this as production when the project production branch is `master`. Use `CLOUDFLARE_PROJECT_NAME` when deploying to a differently named Pages project. ```sh diff --git a/site/decodal-site/package.json b/site/decodal-site/package.json index c4aa169..1a1b74c 100644 --- a/site/decodal-site/package.json +++ b/site/decodal-site/package.json @@ -8,7 +8,7 @@ "build": "astro build", "preview": "astro preview --host 0.0.0.0", "build:wasm": "wasm-pack build ../../crates/decodal-wasm --target web --out-dir ../../site/decodal-site/src/wasm --release", - "deploy": "npm run build && wrangler pages deploy dist --project-name ${CLOUDFLARE_PROJECT_NAME:-decodal-site}", + "deploy": "npm run build && wrangler pages deploy dist --project-name ${CLOUDFLARE_PROJECT_NAME:-decodal-site} --branch ${CLOUDFLARE_BRANCH:-master}", "deploy:wasm": "npm run build:wasm && npm run deploy" }, "dependencies": {