diff --git a/.github/workflows/master_practicelab1.yml b/.github/workflows/master_practicelab1.yml new file mode 100644 index 00000000..42fe50ac --- /dev/null +++ b/.github/workflows/master_practicelab1.yml @@ -0,0 +1,66 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy ASP app to Azure Web App - practicelab1 + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup MSBuild path + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v1.0.5 + + - name: Restore NuGet packages + run: nuget restore + + - name: Publish to folder + run: msbuild /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="\published\" + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v3 + with: + name: ASP-app + path: '/published/**' + + deploy: + runs-on: windows-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + permissions: + id-token: write #This is required for requesting the JWT + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v3 + with: + name: ASP-app + + - name: Login to Azure + uses: azure/login@v1 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_DB1A28FA099340208663842BF1241E32 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_F6285D4AD6DE40899F312E7A6BD2BBDC }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_84F614C3F6DD4FFFAA32DB3F83344834 }} + + - name: Deploy to Azure Web App + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: 'practicelab1' + slot-name: 'Production' + package: . + \ No newline at end of file diff --git a/.github/workflows/master_web-apppractice11.yml b/.github/workflows/master_web-apppractice11.yml new file mode 100644 index 00000000..f54ddfd0 --- /dev/null +++ b/.github/workflows/master_web-apppractice11.yml @@ -0,0 +1,66 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy ASP app to Azure Web App - web-apppractice11 + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup MSBuild path + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v1.0.5 + + - name: Restore NuGet packages + run: nuget restore + + - name: Publish to folder + run: msbuild /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="\published\" + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v3 + with: + name: ASP-app + path: '/published/**' + + deploy: + runs-on: windows-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + permissions: + id-token: write #This is required for requesting the JWT + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v3 + with: + name: ASP-app + + - name: Login to Azure + uses: azure/login@v1 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_06B12E8695FB45089EF9E062E1C7163D }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_B23851F7F4394F25ACA1D22B4BA1031A }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_9B6BB5F3A7CD46E295E740113CCE9B44 }} + + - name: Deploy to Azure Web App + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: 'web-apppractice11' + slot-name: 'Production' + package: . + \ No newline at end of file diff --git a/.github/workflows/master_webapppractice1.yml b/.github/workflows/master_webapppractice1.yml new file mode 100644 index 00000000..5fa291eb --- /dev/null +++ b/.github/workflows/master_webapppractice1.yml @@ -0,0 +1,66 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy ASP app to Azure Web App - webapppractice1 + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup MSBuild path + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v1.0.5 + + - name: Restore NuGet packages + run: nuget restore + + - name: Publish to folder + run: msbuild /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="\published\" + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v3 + with: + name: ASP-app + path: '/published/**' + + deploy: + runs-on: windows-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + permissions: + id-token: write #This is required for requesting the JWT + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v3 + with: + name: ASP-app + + - name: Login to Azure + uses: azure/login@v1 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_2AC5EA64AF5F40CEB58D1E612139ECC9 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_7E5B679C38CF4BC3AAE71A3C15A464B1 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_D93C9484968A4D51A63EE515ED82A463 }} + + - name: Deploy to Azure Web App + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: 'webapppractice1' + slot-name: 'Production' + package: . + \ No newline at end of file diff --git a/aspnet-get-started/Views/Home/Index.cshtml b/aspnet-get-started/Views/Home/Index.cshtml index 32e1dd94..a32937f9 100644 --- a/aspnet-get-started/Views/Home/Index.cshtml +++ b/aspnet-get-started/Views/Home/Index.cshtml @@ -3,9 +3,8 @@ }
ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.
- +Example .NET app to Azure App Service.