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