set preview environment variables while using github ci
i cant seem to figure out how to set specific environment variables for preview builds with workers connected to github, how can i do this so i have like preview secrets vs production secrets?
1 Reply
You’ll probably want to use wrangler environments. You will end up with two workers, but each will have its own bindings/secrets, etc. The configuration can be in one wrangler file, and you’ll set your non production deployment command to specify your preview env (eg wrangler deploy -e preview).