Deploy via GitHub Actions
MattIPv4 opened this issue · comments
Create a GitHub Actions workflow the runs on pushes to a branch named production
. This workflow should deploy the production environment of the worker to Cloudflare.
As a follow-up, once this initial workflow has been created, duplicate it for a branch named staging
, and have it deploy the staging environment of the worker to Cloudflare.
Hello ! I would like to pick up this ? Could you please assign me to this? Thanks
Sure thing
For reference, I imagine you'll want to utilise https://github.com/marketplace/actions/deploy-to-cloudflare-workers-with-wrangler
Yup! Thanks. I will get started and we shall discuss if I need something here.
I am new to Wrangler. Can you please confirm whether I need to create respective .env file before deployment ? If needed then I can pick it up from Github Secrets right ?
Yes, the .env file will need to be created. And yeah, building it from GitHub Secrets seems like the best approach
Alternatively, you could change the Webpack script to inject the full env, and then just use the environment directly without the .env file:
DNS-over-Discord/webpack.config.js
Line 15 in 6c45725