In order to simplify things but also keep everything secure and accessible, here's my proposed deployment workflow:
staging is the main working branch, which is synced to the staging website. We use it to test changes.
- When you need to test changes in the
staging branch, you can SSH into the server and git pull to get the changes.
- When everything is ready and needs to be deployed, create a PR to merge
staging with production.
- At this point
git pull in the right directory will sync production branch on the server. production branch is protected.
We may automate step 4 using GitHub Actions to deploy code automatically once changes are made to the production branch. This will expedite the process and can also help reduce access to sensitive server credentials.
In order to simplify things but also keep everything secure and accessible, here's my proposed deployment workflow:
stagingis the main working branch, which is synced to the staging website. We use it to test changes.stagingbranch, you can SSH into the server andgit pullto get the changes.stagingwithproduction.git pullin the right directory will syncproductionbranch on the server.productionbranch is protected.We may automate step 4 using GitHub Actions to deploy code automatically once changes are made to the
productionbranch. This will expedite the process and can also help reduce access to sensitive server credentials.