forked from TreeOfAKind/TreeOfAKind
37 lines (29 loc) · 984 Bytes
/
dotnet-core-cd.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
# 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 to test enviroment
on:
workflow_dispatch:
push:
branches: develop
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.100'
- name: Build with dotnet
run: dotnet build --configuration Debug
working-directory: ./backend/
- name: dotnet publish
run: dotnet publish -c Debug -o ${{env.DOTNET_ROOT}}/myapp
working-directory: ./backend/TreeOfAKind.API
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: 'treeofakind-test'
slot-name: 'production'
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ${{env.DOTNET_ROOT}}/myapp