Isaac
Isaac
TTCTheo's Typesafe Cult
Created by Isaac on 7/7/2024 in #questions
How to generate files and upload to Github?
I'm trying to generate files on my nextjs/vercel app and then upload to a new private repo on the user's github account. The user currently signs in using GitHub OAuth, how can I do this?
3 replies
TTCTheo's Typesafe Cult
Created by Isaac on 7/6/2024 in #questions
Backend Architecture - Programmatically generating files and pushing to user's GitHub
Hey guys, I figured this would be a good place to get some input on how to go about this... 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?
8 replies