-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (27 loc) · 866 Bytes
/
Copy pathdeploy-api.yml
File metadata and controls
34 lines (27 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Deploy API to Azure
on:
push:
branches: [main]
paths:
- 'src/**'
- '!src/fitspec-ui/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore
run: dotnet restore src/FitSpec.API/FitSpec.API.csproj
- name: Build
run: dotnet build src/FitSpec.API/FitSpec.API.csproj --configuration Release --no-restore
- name: Publish
run: dotnet publish src/FitSpec.API/FitSpec.API.csproj --configuration Release --no-build --output ./publish
- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v3
with:
app-name: fitspec-api
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ./publish