Currently, our CI uses rm and cp to completely remove our live site and copy it over each time we deploy code (i.e. each merge to main). However, a possibly faster and more robust way is to use rsync to incrementally copy files after they have been sent to the server.
This will also eliminate the need to maintain a separate .env master file that is copied over in each deployment, and eliminate the risk of losing uploaded files (in case files uploaded are in the repo's "storage" directory)
Current behavior:
In the "Deploy code" step of our deply-app.yml github workflow, the live site is rmd and cp over into the tool account.
Expected Behaviour (AC):
- In the "Deploy code" step of our deply-app.yml github workflow, the live site is rsynced incrementally over into the tool account.
- .env file is no longer copied into the deployed code folder after copying is complete (the only version of .env lives in the miamatch-finder-repo directory)
Hints:
- Using rsync to incrementally copy files: https://linuxhint.com/rsync_copy_files/
Notes:
- come up with a good way to remove resources from production again if they are removed from the repository