Create a GitHub Repo
In order to deploy an app to a Digital Ocean server we need to create a GitHub repo that contains the production code (code in dist).
Log into GitHub.com and click the New button to create a new repository. On the Create a New Repository page, enter a name for the repo and press the Create repository button.
Create a Local Git Repo and Push Your App’s Code to GitHub
If not already, open your project directory in Visual Studio Code.
Open the terminal in VSC and change your current working directory to dist.
Now, execute the following commands in the terminal while replacing USERNAME with your GitHub username and replacing REPO-NAME with the name of your GitHub repository.
$ git init $ git add * $ git commit -m "first commit" $ git branch -M main $ git remote add origin git@github.com:USERNAME/REPO-NAME.git $ git push -u origin main
If you were successful and you refresh your browser you will see the files in your dist directory are now also in your GitHub repo.