Ethan McTague

How to Set Up Git Deployment on Dev.Fast

Deploying via FTP is convenient enough, but I prefer this approach. It allows me to keep track of changes, and even roll them back when necessary! If you've already used a GitOps-style workflow elsewhere, you may find this more comfortable.

  1. Log into CPanel using your Sheridan account.
  2. Back up any important files in your public_html directory to your own device.
  3. Ensure your local SSH public key is authorized under "SSH Access", if you haven't already.
  4. Select "Git Version Control".
  5. Click on "Create".
  6. Turn off "Clone a Repository".
  7. Under "Repository Path", type public_html.
  8. Name the repository anything you please, and click "Create".
  9. The resulting page will provide you with instructions on how to clone the repository.
  10. Open a terminal and SSH into your dev.fast account.
  11. cd into public_html.
  12. Run: git clean -d -f .
  13. Git deployment is ready to go! Commit and push changes to the master branch in order to deploy.