Introduction
In the world of software development, words such as continuous implementation are always present. In this case, continuous deployment is a strategy for software versions, so that any code commit that passes the testing phase automatically is released in a production environment, deploying changes that are visible to users of the software in question.

This is a small variation of continuous delivery because if you had to perform a manual deployment before, here in (CD) simply for each merge to the master branch is proceeded to perform a deployment automatically, the process remains as follows:
- Change Control (Source Control).
- Build and Tests.
- Staging (Staging).
- Deploy to Production: Latest version running on the main website.
Taking these considerations into account, with continuous deployment, the entire process from code commit to production is automated. The trigger between the development and delivery phases is automatic, so code changes are pushed live once they receive validation and pass all tests. This means that users receive improvements as soon as they are available.
In this tutorial article, we'll learn step-by-step the process of continuously deploying a web application developed with DotVVM through ASP.NET Core to publish it automatically and continuously to an Azure App Service resource, using GitHub Actions.
In relation to GitHub Actions, this is a functionality that allows us to create workflows that can be used to compile, test and deploy code, giving the possibility to create integration flows and continuous deployment within the GitHub repository itself as we will see later.
Activities
To carry out continuous deployment activities, we have three important parts within this process,
- Associate the project in question from Visual Studio 2019 with a repository on GitHub.
- Create an App Service resource in Azure.
- Configure deployment actions to Azure in the GitHub repository.
Required Resources
To follow this article step by step, you need to have these tools:
- .NET Core SDK.
- Visual Studio 2019.
- Workload: Web Development and ASP.NET, for Visual Studio 2019.
- The DotVVM extension for Visual Studio 2019.
- A GitHub account.
- An Azure subscription.
- If the project is associated with a database, it must be hosted in the cloud.
The solution environment
Projects for application development with ASP.NET Core and DotVVM are based on the Model, View, View model pattern; for communication between HTML (web pages) and C# (source code). The purpose of these parts are as follows:
- - Model. — is responsible for all application data and related business logic.
- - The view. — Representations for the end-user of the application model. The view is responsible for displaying the data to the user and allowing manipulation of application data.
- - Model-View or View-Model. — one or more per view; the model-view is responsible for implementing view behavior to respond to user actions and for easily exposing model data.
In this case, there are three projects for this purpose:
- - DAL (Data Access Layer): to manage database connection and access.
- - BL (Business Layer): for the handling of services and application domain logic.
- - APP - Application Presentation Layer. This section is where we have Views and Viewmodels for designing web pages with DotVVM.
The solution in Visual Studio 2019 looks like this:

Want to know the steps to create a DotVVM app? To do this you can review this article: Steps to create an MVVM application (Model-View-ViewModel) with DotVVM and ASP.NET Core.
Associate the project from Visual Studio 2019 with a repository on GitHub
The first thing to do is to verify that we have the GitHub extension installed for Visual Studio 2019. To do this we can go to the options menu in the Extensions section and select the Manage Extensions option. In this box, we can perform the verification.

In case you do not have the GitHub extension for Visual Studio 2019, the installer can be found at the following address: visualstudio.github.com/. To add the extension, Visual Studio must be closed as they are changes to the Microsoft IDE that are made during installation.
Now, we proceed to associate with the solution that contains the three projects (.APP, .BL and . DAL) to a repository on GitHub, to do this, right-click on the Visual Studio solution and select Add Solution to Source Control:

Later we went to the Team Explorer view and connected our GitHub account to Visual Studio in the Connect option.

Then we go to the Team Explorer option: Synchronization: select Publish to GitHub and continue with the instructions presented for creating a new repository.

A short time later, our project will be associated with the repository we just created. We can check this directly from GitHub:

Note
Whenever we need to save our changes, we can save them from the Changes section of Team Explorer:

And in the Sync section we need to confirm the output changes,

With these first steps, our application with DotVVM and ASP.NET Core in Visual Studio 2019 is already associated with a particular GitHub repository.
Create an App Service resource in Azure
To create an App Service-type resource in Azure, we can go to the portal: portal.azure.com/ and then search for the service in the left pane of Azure where the most commonly used Azure resources are located or in the search section. In either scenario, we proceed to create the resource and to the end, we will have something like this:

We will need to specify the name of the Web App, the runtime environment, which in this case is .NET Core and its latest version 3.1 (August 2020). We also need to specify the operating system on which the application will be deployed.
The creation process will take a few seconds.











Roshan RathodPosted Aug 7, 2020, 1:36 AM
Nice.......