Is it possible to only deploy the Pages config in wrangler.toml when using `wrangler pages deploy`?
Currently I'm using the Git integration of Cloudflare pages to handle deployments of my app. But the Pages config & env vars are managed by wrangler.toml. I want to add a CI step that deploys only the latter without any static assets. Is this currently possible? I don't see it within the pages deploy options when running it with
--help
.5 Replies
No that isn't possible. You need to do a whole deployment (so assets and bindings)
Any reason to not just add the wrangler.toml to Git?
I have a few secrets that should be there at build time that I don't want to commit with wrangler.toml as environment variables. I can add them manually to the Pages config from the dashboard as encrypted values as a workaround. But it would be preferred to have all config for Pages in one wrangler.toml.
Is this the intended solution for that? This is something I would be able to execute from our CI outside of Cloudflare.
https://developers.cloudflare.com/workers/configuration/secrets/#via-wrangler
Cloudflare Docs
Secrets · Cloudflare Workers docs
Store sensitive information, like API keys and auth tokens, in your Worker.
Sounds like you want https://github.com/cloudflare/workers-sdk/pull/5549
GitHub
Support
wrangler pages secret put|delete|list|bulk
by penalosa · ...What this PR solves / how to test
This PR supports adding secrets to a Pages project using the Wrangler CLI. Similarly to wrangler secret, this PR adds a wrangler pages secret set of commands. Ther...
Which hopefully will land soon
Ah nice. Thanks for the help 🙂