noob saibot
noob saibot6mo ago

Deploy Convex with Github Actions: Error: Please set CONVEX_DEPLOY_KEY to a new key

I would like to deploy convex to production via a Github Action. Here is a snippet of the action:
jobs:
convex_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup
uses: ./tooling/github/setup

- name: Convex Deploy
working-directory: apps/api
run: pnpm run build
env:
CONVEX_DEPLOY_KEY: ${{ secrets.CONVEX_DEPLOY_KEY }}
CONVEX_URL: ${{ secrets.CONVEX_URL }}
jobs:
convex_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup
uses: ./tooling/github/setup

- name: Convex Deploy
working-directory: apps/api
run: pnpm run build
env:
CONVEX_DEPLOY_KEY: ${{ secrets.CONVEX_DEPLOY_KEY }}
CONVEX_URL: ${{ secrets.CONVEX_URL }}
I have defined the variables CONVEX_DEPLOY_KEY and CONVEX_URL in Github secrets for the production environment. But when I run the action, it constantly fails with error: Please set CONVEX_DEPLOY_KEY to a new key which you can find on your Convex dashboard. But I have successfully generated a deployment key in my project dashboard. Not sure how I can fix this error
4 Replies
sshader
sshader6mo ago
Could you confirm that the deploy key is actually being picked up by your GH action? (like have another step that just echos them) Also I remember having some struggles myself with having to set this as a repository secret vs. an environment secret (I don't actually remember which one was correct, but if I had to guess, I think it's repo secret)
noob saibot
noob saibotOP6mo ago
Hi @sshader It looks like I can't echo secrets for debug purpose: Github is obfuscating secrets values. I decided to add the same values in the environment secrets and variables sections. But I'm still getting the same error... Ok, it has worked! I had to add the variables in the github actions secrets section.
Abhishek
Abhishek6mo ago
@noob saibot could you share the repo link even I want to add it
noob saibot
noob saibotOP6mo ago
@Abhishek unfortunately the repo belongs to a private repository. But I can share here a screenshot of where I added these variables:
No description

Did you find this page helpful?