How to apply a custom patch on Magento Cloud?

Please make sure to test all patches in a pre-production environment. For Adobe Commerce on cloud infrastructure, you can create new branches with the magento-cloud environment:branch <branch-name>
CLI command.
To apply a custom patch on a Cloud environment, please follow the steps below.
Step 1. In the project root, create a directory called m2-hotfixes
if it does not exist. Please run the following command:
mkdir m2-hotfixes
Step 2. Copy the patch file to the /m2-hotfixes
directory. All patch file names must end with the .patch
extension
Step 3. Add, commit, and push code changes:
git add -A
git commit -m "Apply patch"
git push origin