How to continuously deploy and run my app on a Linux host?
Hello, I have a web app written in .NET 5, I bought a Linux VPS, set up Nginx and other stuff to run my app, pushed the release file via FTP using Visual Studio. Now if I try dotnet myapp.dll
, the app fires up and I can access it.
The problem is if I make a change and push the newly modified-release files, each and every time I have to restart the app to see the changes. Which is a hassle. I want to automate this task.
I found a GitHub action that can build and deploy to my FTP server. But how can I automate the dotnet myapp.dll
thing each time I push the code to my repo?
Here are few steps that will help to illustrate the scenario -
- I made some changes to my app
- I will push it to my repository (GitHub or Azure DevOps)
- Action will build the app
- If the build is successful, it will push it to the FTP (GH Action or DevOps Pipe-line)
- When the new file arrives at the FTP, an action will restart the app and make the changes active.
alternatively,
- I made some changes to my app
- I will build the app and publish it to the FTP via Visual Studio
- When the new file arrives at the FTP, an action will restart the app and make the changes active.
How can I do this?