So right now, I have a NextJS/Typescript app set up with GitHub Auth. The user fills out a form that which then gives me a long command line string to generate some files (using yarn/npm) — I have up to this point done now. What I’m wondering about is this next part though, I want to run this command somewhere (Separate Linux VM? Right there on Vercel?) to generate the files, and then I also want to upload them to a new private repository on their GitHub account. Not sure what the best way to do this is.
For some context, this app is fully hosted on Vercel, but I’m not sure I’ll be able to just npm/yarn install stuff and create/delete files on Vercel’s server.
I’m thinking…
Should I set up a completely separate Linux VM and somewhere securely pass the GitHub credentials necessary over there? And then from there do the whole file generation, push to github, and then file deletion?
If so, how can I securely get the GitHub information/secrets from my current backend over to that server
Or should I do this on all on the Vercel server somehow?
Or is there another more obvious way that I’m not realizing?
Isaac Levine is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.