Deploying convex and astro on github pages with github action
I am looking at the Custom Domains & Hosting and it explains how to manually deploy to github pages.
I am currently deploying to gh pages using a github action, I am using the withastro/action@v3 action to do the deployment.
So I am unsure on how to do the step that says to run
npx convex deploy --cmd 'npm run build'
I am never runing npm run in the gh action. how am I supposed to do this?
is it even possible to do an automatic deployment? do I have to put in the env vars manually in github secrets after running convex deploy locally?3 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
That doc mentions that you would follow the Vite GitHub Pages guide. In that guide,
npm run build
is run by the action: https://vite.dev/guide/static-deploy.html#github-pages
You would swap npm run build
for npx convex deploy --cmd 'npm run build'
ya, I ended up rewriting my action to not use the astro provided build action
this is what I have that works