danielhok
08/09/2023, 2:45 PMbash
echo "Publishing dotnet"
cd /Users/danieloberlechner/Projekte/2-CSharp/DanielOberlechner
dotnet publish -C Release
echo "This script will initiate to copy all local files to OdroidC2 Server and deploy them accordingly."
scp -r /Users/danieloberlechner/Projekte/2-CSharp/DanielOberlechner/bin/Debug/net7.0/publish/* Server:/var/www/personal_website/
echo "copy umbraco stuff"
scp -r /Users/danieloberlechner/Projekte/2-CSharp/DanielOberlechner/umbraco Server:/var/www/personal_website/
echo "Run update website script"
update-website
This is the big update script, and I got also a smaller one for smaller changes:
bash
echo "Updating view files"
scp -r /Users/danieloberlechner/Projekte/2-CSharp/DanielOberlechner/Views
Server:/var/www/personal_website/
echo "Update wwwroot"
scp -r /Users/danieloberlechner/Projekte/2-CSharp/DanielOberlechner/wwwroot
Server:/var/www/personal_website/
echo "Update appsettings"
scp -r /Users/danieloberlechner/Projekte/2-CSharp/DanielOberlechner/appsettings* Server:/var/www/personal_website/
It takes about a half a minute if I run the init-website script.
But there should be a better way then copying thousands of files every time to the server? should exist ?
I have also a other problem:
I use smidge at the moment for bundling and I made changes to the Startup.cs but on the live server the additionally added minifcation css and js files are not there, they won't get minified into the bundle I want to.
I suppose thats to a issue that I do not copy all important files to the live server.
Has anyone of you created a pipeline or a script to update changes to a server? I use everything selfhosted so umbraco cloud etc. is no option for me...
Has anyone some hints or a guidline how I can proceed with this the best way?Craig100
08/09/2023, 3:10 PMdanielhok
08/09/2023, 4:48 PMCraig100
08/09/2023, 4:52 PMdanielhok
08/09/2023, 4:53 PMSebastiaan
08/09/2023, 7:18 PM