This article is about deploying Provider hosted app’s app web in azure using Git i.e. without use of visual studio. Also, same steps can be performed for deployment of .Net applications in Azure.
Lets get started..
1. Create New Azure Web App in App Service.
- Login to Azure Portal
1.1 Navigate to Poratl.azure.com .
1.2 Login with admin credentials.
- Create Web App
1.3 . Click App Services in left navigation > +Add
1.4 Under Web Apps section, click Web App (First option) > Create. Then one window will appear.
1.5 Fill in all details.
1.6 After Adding Web App Details Click Create.
2. Select newly created web app, select Deployment credentials. Add details and save.
3. Select Deployment Source as Local GIT Repository from the Deployment Options of newly created web app and click OK.
4. Navigate to web app properties. From Web App properties, copy GIT URL
It will be like this: https://firstname.lastname@example.org:443/GitDeploymentTest.git
Keep this handy as it’s required in the step 10.
5. Install the GIT tool from https://git-scm.com/
6. Open GIT CMD with administrative privilege. Navigate to the folder where you have kept the Web Publish files. Enter.
7. Initialize git
8. To add all the files from the current directory
git add *
9. To commit the changes made in the directory
git commit -m "Test"
10. To sync the Web Publish folder with Azure copy GIT URL captured at step 4 and add to it in below command.
git remote add azure
11. To save the changes
git push azure master