forked from marcominerva/PdfSmith
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.05 KB
/
deploy.yml
File metadata and controls
41 lines (34 loc) · 1.05 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
name: Deploy on Azure
permissions:
contents: read
on:
push:
branches: [ master ]
paths: [ 'src/**' ]
workflow_dispatch:
env:
AZURE_WEBAPP_NAME: pdfsmith
AZURE_WEBAPP_PACKAGE_PATH: './published'
NET_VERSION: '10.x'
PROJECT_NAME: src/PdfSmith
RUNTIME: linux-x64
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET SDK ${{ env.NET_VERSION }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.NET_VERSION }}
dotnet-quality: 'ga'
- name: Publish
run: dotnet publish ${{ env.PROJECT_NAME }} --configuration Release --runtime ${{ env.RUNTIME }} --self-contained true --output ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}