-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix deployment #3
Conversation
pyropy
commented
Dec 17, 2024
•
edited
Loading
edited
- Add missing cloudflare account id
- Update node version
- Pull env variable values from vars context
- Closes Automate testing and deployment using Github Actions #4
package.json
Outdated
@@ -5,7 +5,7 @@ | |||
"description": "A template for kick starting a Cloudflare Workers project", | |||
"main": "index.js", | |||
"scripts": { | |||
"deploy": "wrangler deploy", | |||
"deploy": "wrangler deploy --env dev", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why dev env?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If environment is not specified it will deploy to default environment. Since we have environment production
defined, I thought it might be good to be explicit here. I can roll it back if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why would we deploy to the dev environment? Shouldn't we deploy to production? I would expect nom run deploy
to do that. If you specifically want to deploy to dev, what about renaming the script to "deploy:dev"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found it useful to deploy during the development as many things like cache are not available out of the box. I do agree that the name might be a little off -- I'm renaming the script to deploy:dev
and deploy:prod
to deploy
.