Skip to content

Commit

Permalink
Add Actions pipeline to publish to Azure App Service
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillOsenkov committed Nov 25, 2022
1 parent 5ab84f2 commit 0b90c3e
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/roslynquoter.yml
@@ -0,0 +1,48 @@
name: Build and deploy .NET Core application to Web App roslynquoter
on:
push:
branches:
- main
env:
AZURE_WEBAPP_NAME: roslynquoter
AZURE_WEBAPP_PACKAGE_PATH: src\Quoter.Web\published
CONFIGURATION: Release
DOTNET_CORE_VERSION: 6.0.x
WORKING_DIRECTORY: src\Quoter.Web
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
- name: Restore
run: dotnet restore "${{ env.WORKING_DIRECTORY }}"
- name: Build
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore
- name: Test
run: dotnet test "${{ env.WORKING_DIRECTORY }}" --no-build
- name: Publish
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build --output "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}"
- name: Publish Artifacts
uses: actions/upload-artifact@v1.0.0
with:
name: webapp
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
deploy:
runs-on: windows-latest
needs: build
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: webapp
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
- name: Deploy to Azure WebApp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.roslynquoter_186F }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}

0 comments on commit 0b90c3e

Please sign in to comment.