-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 1.55 KB
/
deploy.yml
File metadata and controls
56 lines (50 loc) · 1.55 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Deploy to azure
on:
push:
branches: [ "master" ]
paths-ignore:
- 'README.md'
- 'Docs/AdeNote_Configuration.config'
env:
staging-url : 'https://adenote.azurewebsites.net/'
output_path: 'AdeNote.API/bin/Release/net6.0/publish/'
azure_web_name: 'adenote'
artifact_name: adenote_artifact
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: publish release
run: dotnet publish -c Release
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{env.artifact_name}}
path: '${{env.output_path}}'
if-no-files-found: error
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: production
url: ${{env.staging-url}}
steps:
- name: check out
uses: actions/checkout@v3
- name: download artifact
uses: actions/download-artifact@v4
with:
name: ${{env.artifact_name}}
- name: Deploy to azure
uses: azure/webapps-deploy@v2
with:
app-name: ${{env.azure_web_name}}
publish-profile: ${{ secrets.AzureAppService_PublishProfile}}
package: '.'