As I was following through the tutorial on the same topic (https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps), I successfully established a git repo at the vps, I even added remote live by git remote add live ssh://myuser@mydomain.com/var/repo/site.git I already have local git setup I regularly use git with my team.
The problem is now my project doesn’t have the repo name in the static files Url.
<head>
<meta charset="utf-8">
<title>AngularTourOfHeroes</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="styles.35b4cc1e4bf063be119d.css">
</head>
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.
Normally these static files are served relative to the base URL declared in your code (like in your base href).
One way to include your repository’s name in your static file URLs would be to add it to the base href in your HTML file, or define it in environment configuration files (if your framework uses such files).
For example, you might change your base href to the following:
html
Remember to adjust the href value according to your server’s structure. Also, be sure to update any additional references to ensure they use the correct paths. It’s also a good idea to double check your server’s settings to make sure it’s properly configured to serve static files from the intended path.
For more information about GIT repository and linking to static files, please refer to the DigitalOcean documentation.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.