Skip to content

Commit

Permalink
added azure
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryce Coon committed Feb 14, 2024
1 parent ee9242e commit c2787c6
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/BlazorTickets20240214165128.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and deploy .NET Core application to Web App BlazorTickets20240214165128
on:
push:
branches:
- master
env:
AZURE_WEBAPP_NAME: BlazorTickets20240214165128
AZURE_WEBAPP_PACKAGE_PATH: BlazorTickets/published
CONFIGURATION: Release
DOTNET_CORE_VERSION: 8.0.x
WORKING_DIRECTORY: BlazorTickets
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
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@v3
with:
name: webapp
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
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.BlazorTickets20240214165128_40D5 }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}

0 comments on commit c2787c6

Please sign in to comment.