File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Sample API to Azure
2+
3+ on :
4+ push :
5+ branches : [master]
6+ paths :
7+ - " src/c-sharp/JakubKozera.OpenApiUi.Sample/**"
8+ workflow_dispatch :
9+
10+ env :
11+ AZURE_WEBAPP_NAME : openapi-ui
12+ AZURE_WEBAPP_PACKAGE_PATH : " ./src/c-sharp/JakubKozera.OpenApiUi.Sample"
13+ DOTNET_VERSION : " 10.0.x"
14+
15+ jobs :
16+ build-and-deploy :
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - name : Checkout code
21+ uses : actions/checkout@v4
22+
23+ - name : Setup .NET
24+ uses : actions/setup-dotnet@v4
25+ with :
26+ dotnet-version : ${{ env.DOTNET_VERSION }}
27+
28+ - name : Restore dependencies
29+ run : dotnet restore ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/JakubKozera.OpenApiUi.Sample.csproj
30+
31+ - name : Build application
32+ run : dotnet build ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/JakubKozera.OpenApiUi.Sample.csproj --configuration Release --no-restore
33+
34+ - name : Publish application
35+ run : dotnet publish ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/JakubKozera.OpenApiUi.Sample.csproj --configuration Release --no-build --output ./publish
36+
37+ - name : Login to Azure
38+ uses : azure/login@v2
39+ with :
40+ creds : ${{ secrets.AZURE_CREDENTIALS }}
41+
42+ - name : Deploy to Azure Web App
43+ uses : azure/webapps-deploy@v3
44+ with :
45+ app-name : ${{ env.AZURE_WEBAPP_NAME }}
46+ package : ./publish
You can’t perform that action at this time.
0 commit comments