I`m using gitlab-ci for deploying .net application on Digitalocean. With gitlab runner I build project on Gitlab, with "dotnet build", with the next step I need to stop somehow the server on Digitalocean to run rsync for the new version.
How can I stop .net if it not inside docker container.
My step looks like:
-
- "dotnet build"
- cd ..
- ssh $SERVER_USER@$PROD_SERVER_IP '
- /home/myproject
// here needs step for stoping
- rsync -az ./server/bin/ $SERVER_USER@$PROD_SERVER_IP:/home/myproject
# Non interactive ssh gracefully reloads server
- ssh $SERVER_USER@$PROD_SERVER_IP '.
/etc/profile;
systemctl restart nginx;'