Fix Cloudflare Pages deploy: drop unsupported --config path
Wrangler 4.129 rejects a custom --config path for pages deploy
("Pages does not support custom paths for the Wrangler configuration
file"). wrangler.toml already sits at the repo root, so cd there
before invoking wrangler and let it auto-discover the file instead.6782bef parent: afcdfde modified
flake.nix +6 -1 | @@ -92,7 +92,12 @@ | ||
| 92 | 92 | lang="''${1:?usage: nix run .#deploy -- <lang>}" |
| 93 | 93 | root="$(git rev-parse --show-toplevel)" |
| 94 | 94 | project="mykiwi-blog-$lang" |
| 95 | - wrangler pages deploy "$root/result/$lang" --project-name="$project" --branch=main --config="$root/wrangler.toml" | |
| 95 | + # Pages deploy no longer accepts --config pointing at a custom | |
| 96 | + # path ("Pages does not support custom paths for the Wrangler | |
| 97 | + # configuration file"), so cd to where wrangler.toml lives and | |
| 98 | + # let Wrangler auto-discover it instead. | |
| 99 | + cd "$root" | |
| 100 | + wrangler pages deploy "$root/result/$lang" --project-name="$project" --branch=main | |
| 96 | 101 | ''; |
| 97 | 102 | }}/bin/mykiwi-blog-deploy"; |
| 98 | 103 | }; |
| @@ -92,7 +92,12 @@ | |||
| 92 | lang="''${1:?usage: nix run .#deploy -- <lang>}" | 92 | lang="''${1:?usage: nix run .#deploy -- <lang>}" |
| 93 | root="$(git rev-parse --show-toplevel)" | 93 | root="$(git rev-parse --show-toplevel)" |
| 94 | project="mykiwi-blog-$lang" | 94 | project="mykiwi-blog-$lang" |
| 95 | - wrangler pages deploy "$root/result/$lang" --project-name="$project" --branch=main --config="$root/wrangler.toml" | 95 | + # Pages deploy no longer accepts --config pointing at a custom |
| 96 | + # path ("Pages does not support custom paths for the Wrangler | ||
| 97 | + # configuration file"), so cd to where wrangler.toml lives and | ||
| 98 | + # let Wrangler auto-discover it instead. | ||
| 99 | + cd "$root" | ||
| 100 | + wrangler pages deploy "$root/result/$lang" --project-name="$project" --branch=main | ||
| 96 | ''; | 101 | ''; |
| 97 | }}/bin/mykiwi-blog-deploy"; | 102 | }}/bin/mykiwi-blog-deploy"; |
| 98 | }; | 103 | }; |