I want to upload my dist folder to Github and then sync it to my DirectAdmin deployment... How do I set it up?

74 Views Asked by At

I have managed to setup my Github private repo, but I want to sync it to my DirectAdmin so I can deploy it from there and have everything synced up. my git dashboard within directadmin

I tried using SSH and HTTPS, but I don't have the best understanding of those technologies so I may have done it wrong.

1

There are 1 best solutions below

3
Djo On

To sync your GitHub repository with your DirectAdmin server try this steps using SSH method :

-To generate SSH Key on DirectAdmin:Log in to DirectAdmin, go to "SSH Manager," and generate an SSH key pair.

-Add SSH Key to GitHub:Copy the public key (~/.ssh/id_rsa.pub) to GitHub's SSH settings.

-Clone Repository on DirectAdmin:SSH into your DirectAdmin server and clone your GitHub repo using this code:

git clone [email protected]:your-username/your-repository.git

-Pull Changes:Update your code on the server with:

git pull origin main