Compare commits

...

8 Commits

Author SHA1 Message Date
Serhii Shchoholiev
9a79645730
Merge pull request #27 from Shchoholiev/release/v1.0.0
Release/v1.0.0
2023-12-19 18:08:27 -08:00
Serhii Shchoholiev
48f15e34c1
Merge pull request #22 from Shchoholiev/release/v0.1.1
SA-209 Added CORS
2023-12-02 19:20:15 -08:00
Serhii Shchoholiev
e55e7d98c7
Updated master_shopping-assistant-api.yml 2023-11-26 11:05:41 -05:00
Serhii Shchoholiev
cc6322049a Add or update the Azure App Service build and deployment workflow config 2023-11-26 07:48:20 -08:00
Serhii Shchoholiev
fcab30a7a9
Merge pull request #21 from Shchoholiev/release/v0.1.0
Release/v0.1.0
2023-11-26 07:44:05 -08:00
Serhii Shchoholiev
2506df0477
Delete .github/workflows/develop_shopping-assistant-api-dev.yml 2023-11-26 10:43:05 -05:00
Serhii Shchoholiev
cb090b6b9d
SA-72 Update develop_shopping-assistant-api-dev.yml 2023-10-28 22:13:11 -04:00
Serhii Shchoholiev
83004abac3
SA-72 Create develop_shopping-assistant-api-dev.yml 2023-10-28 22:07:26 -04:00

View File

@ -0,0 +1,57 @@
# 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.Net Core app to Azure Web App - shopping-assistant-api
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.x'
include-prerelease: true
- name: Build with dotnet
run: dotnet build --configuration Release
- name: dotnet publish
run: dotnet publish ShoppingAssistantApi.Api/ShoppingAssistantApi.Api.csproj -c Release -o ${{env.DOTNET_ROOT}}/myapp --no-build --no-restore
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: .net-app
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'shopping-assistant-api'
slot-name: 'Production'
package: .
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_B8C76EBBC8E542F3A0BF262061E07A08 }}