page_type | description | products | languages | |||
---|---|---|---|---|---|---|
dotnet core |
Deploy .NET application using GitHub Actions |
|
|
For all samples to set up GitHub workflows, see [Create your first workflow](https://github.com/Azure/actions-workflow-samples
- Create a new Web App in Azure Portal with runtime stack as .NETCore and OS as Linux/Windows
- Copy Publish Profile Settings of the app
This template deploys a web app with ASP.NET support. The web app with ASP.NET is an app service that allows you to deploy your ASP.NET website. This will deploy a free tier Windows App Service Plan where you will host your App Service.
If you are new to Azure App Service, see:
- In the GH repo with Application code, Define a new secret under repository by navigating to settings > secrets > Add a new secret
- Paste the contents for the downloaded publish profile file into the secret's value field
- Now in the workflow file in your branch:
.github/workflows/workflow.yml
replace the secret for the inputpublish-profile:
of the deploy Azure WebApp action
- Commit a change in the app code.
- You should see a new GitHub Action initiated in Actions tab.
- At the end of the execution, navigate to the App URL to visualise the change introduced.
- Checkout Checks out your Git repository content into Github Actions agent.
- Environment setup using Setup DotNet - Sets up a dotnet environment by optionally downloading and caching a version of dotnet by SDK version and adding to PATH .
- DotNet Build & Publish
- Deploy to App service using azure/webapps-deploy@v1 action which authenticates using Azure Web App Publish Profile which we configured using the secret set up at the repo level
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.
Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.
Privacy information can be found at https://privacy.microsoft.com/en-us/
Microsoft and any contributors reserve all others rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.