My approach, but it may not be accurate, I only provide a suggestion.
Generally, the code is first cloned into the deployment directory (Alibaba Cloud's CRP, you can send the source code package to the server, and then call the deployment script), and use the deployment script to do online processing (replacing files, modifying configurations, etc.)... For example, if you Public should not be overwritten. You can just write the logic in the deployment script. Generally, the project directory will not be directly replaced.
It shouldn’t be a direct replacement...
Generally, the code is first cloned into the deployment directory (Alibaba Cloud's CRP, you can send the source code package to the server, and then call the deployment script), and use the deployment script to do online processing (replacing files, modifying configurations, etc.)... For example, if you Public should not be overwritten. You can just write the logic in the deployment script. Generally, the project directory will not be directly replaced.