Hello,
I would like to use github actions to deploy to dev, I normally do it from the cli like
npx convex dev
. I have created a deployment key in the Convex dashboard for both dev and production and added those as secrets in github.
In my github workflow I am adding the key into an env variable like this:
Then, in the job steps I am doing this:
I can see in the action output that the convex key shows obfuscated. When it gets to the point of running npx convex dev
it fails because Convex expects a user interaction of visiting a URL to authorize instead of using the environment CONVEX_DEPLOY_KEY
.
I'm surely doing something wrong. Does anyone has a hint?7 Replies
Try npx convex deploy
but wouldn't that deploy to production?
CLI | Convex Developer Hub
The Convex command-line interface (CLI) is your interface for managing Convex
Any particular reason you want to deploy to dev in this way? Instead of a preview deployment?
It works, thanks a lot Jamie
I was just trying without having read yet about preview deployments, will do that instead, thank you 👍
no problem!
I have this scenario, I don't use a frontend, I am only using Convex as a backend for some slack bot. What I would like to have is a workflow in which if I push a PR to a feature branch it would deploy to a preview deployment or dev deployment or something that let me see the logs of my Convex backend and then if I merge to main I would have it deploy to production
are preview deployments suitable for tha scenario?
oh sorry, I see it works as I expected, I just made a mistake and didn't push my cron.ts and that's why I wasn't seeing logs. All good, thanks