Got a basic question about a dapp in react and GitHub flows.
When I run: npm run build and push the build folder onto GitHub then go to AWS amply to connect to my repository and host the app everything's works great.
Let's say I've made updates to my app.
Do I need to rerun npm run build and push updated to GitHub? For some reason it breaks
Does my build folder need to be my master branch?
GitHub and React experts help 👆my questions are too generic for Google.
Dec 30, 2021, 1:30 AM
If your deployment depends on master, then yes.
Dec 30, 2021, 1:35 AM
Personally I prefer to keep the build folder out of the repo, and use GitHub actions to test, build and deploy instead
Dec 30, 2021, 1:37 AM
I think digital ocean has a hosting service that will watch GitHub for updates and run yarn or npm to build and redeploy. No need to clutter up your repo with build folders.
Dec 30, 2021, 1:43 AM
Yeah that's what I was saying, I don't include the build folder
Dec 30, 2021, 1:44 AM
Let's say I have a repo called dev. Now I'm ready to host it on AWS. What's the best way of doing it:
Run npm run build... And then what?
Checking out a new branch that contains only the build folder? Making a new repo?
How can I easily push updated from dev to build ?
Run npm run build... And then what?
Checking out a new branch that contains only the build folder? Making a new repo?
How can I easily push updated from dev to build ?
Dec 30, 2021, 1:44 AM
You can build and then push it to s3 in a GitHub actions workflow
Can even invalidate CloudFront caches from the workflow too
Dec 30, 2021, 1:46 AM
Do I need to involve S3?, I thought I could point aws amplify to a github repo branch where I have the run build folder, and with code upades I could just rerun build and reconnect the repo to AWS, having the development as master and some side branch called build. Sorry about the stupid questions, I'm a beginner with GitHub
Dec 30, 2021, 1:54 AM
If you don't use s3 then no need. Yeah GitHub actions are pretty flexible, lots you can do
Dec 30, 2021, 1:58 AM
So it seems, thx
Dec 30, 2021, 4:20 AM
sellLimitTime set to 86400. That's 1 day.
Dec 30, 2021, 6:15 AM