-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (33 loc) · 1008 Bytes
/
api.yml
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
35
36
37
38
name: .NET
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
env:
CAMINHO_PROJETO_WEBAPI: ./src/RedisFundamentals/RedisFundamentals.WebApi/RedisFundamentals.WebApi.csproj
NOME_WEBAPP_AZURE: redisfundamentalsapi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Restore dependencies
run: dotnet restore ${{ env.CAMINHO_PROJETO_WEBAPI }}
- name: Build
run: dotnet build ${{ env.CAMINHO_PROJETO_WEBAPI }} --no-restore
- name: Publish
run: dotnet publish ${{ env.CAMINHO_PROJETO_WEBAPI }} -c Release -o api
- name: Login no Azure
uses: Azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS_API }}
- name: Deployment to Azure App Service
uses: Azure/webapps-deploy@v2
with:
app-name: ${{ env.NOME_WEBAPP_AZURE }}
package: './api'