I have a high level question for anyone that can answer. I am new to React, CI/CD, DevOps, etc. and am just learning. Anyway, I stumbled upon GitLab.com which I found I could use for free to host my React apps . Even better, you get SSL for free too!
But what I am doing I suspect is wrong and I need confirmation from someone. After coding and testing my apps locally (localhost:3000) I do a build. Then what I do is Git push the output in the build folder (yes, the transpiled JSX and optimized files in the build folder on my Mac) up to my empty GitLab project. I then add a YAML file, and CI/CD then kicks in and a few minutes later my app is up and running. And it looks and works fine.
My question is, am I doing things backwards. Am I supposed to be pushing to GitLab the untranspiled and unoptimized code, and then using a more sophisticated YAML file to have the pipeline (CI/CD) do the build?
Any advice on this would be great. Here’s my link to my Gitlab files for one of my projects https://gitlab.com/jamesallan626/reactcounter/tree/master and the app can be viewed here https://jamesallan626.gitlab.io/reactcounter/. The reason I ask now is that I’m starting to push lots of stuff up to GitLab and I want to get it right asap. I just want a high level response from anyone who can immediately point out that yes, I am doing things wrong.