Answer the question
In order to leave comments, you need to log in
How not to take into account the compiled code in the GIT system, but at the same time roll it out for production?
Here, for example, I have compiled css / js. I absolutely do not need these files to be marked as changed with each commit, they are simply not needed for change control, since I need to track changes in the source. Nevertheless, the production server uses these files, and, of course, they must be fresh. How to be in such a situation? Add them to gitignore and compile on sale like that.
Answer the question
In order to leave comments, you need to log in
The procedure for deploying to production needs to be changed
Instead of git pull on production, collect the distribution distribution on the intermediate server into some tgz thread and upload it to production already compiled.
The compilation stage can be moved to CI/CD.
For example, if Gitlab is used, then set up a pipeline, in which, after the push, the application is assembled and the already compiled files are sent to production.
Add them to gitignore and compile on sale like that.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question