Skip to content

Commit e1f88fe

Browse files
ci: add workflows for deploy to azure
1 parent 0bbd99c commit e1f88fe

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/deploy-azure.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy to Azure
2+
3+
on: [ release ]
4+
5+
env:
6+
AZURE_WEBAPP_NAME: armoryapi
7+
AZURE_WEBAPP_PACKAGE_PATH: '.'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# Checkout the repo
15+
- uses: actions/checkout@main
16+
17+
- name: Setup .NET Core
18+
uses: actions/setup-dotnet@v1
19+
with:
20+
dotnet-version: 5.0.x
21+
22+
# Run dotnet build and publish
23+
- name: dotnet build and publish
24+
run: |
25+
dotnet restore
26+
dotnet build --configuration Release
27+
dotnet publish -c Release -o '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/armory_out'
28+
29+
# Deploy to Azure Web apps
30+
- name: 'Run Azure webapp deploy action using publish profile credentials'
31+
uses: azure/webapps-deploy@v2
32+
with:
33+
app-name: ${{ env.AZURE_WEBAPP_NAME }}
34+
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
35+
package: '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/armory_out'

0 commit comments

Comments
 (0)