-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add workflows for deploy to azure
- Loading branch information
1 parent
0bbd99c
commit e1f88fe
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Deploy to Azure | ||
|
||
on: [ release ] | ||
|
||
env: | ||
AZURE_WEBAPP_NAME: armoryapi | ||
AZURE_WEBAPP_PACKAGE_PATH: '.' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the repo | ||
- uses: actions/checkout@main | ||
|
||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.x | ||
|
||
# Run dotnet build and publish | ||
- name: dotnet build and publish | ||
run: | | ||
dotnet restore | ||
dotnet build --configuration Release | ||
dotnet publish -c Release -o '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/armory_out' | ||
# Deploy to Azure Web apps | ||
- name: 'Run Azure webapp deploy action using publish profile credentials' | ||
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 }}/armory_out' |