Skip to content

Commit

Permalink
Added YML generated from Visual Studio (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
csharpfritz authored Aug 31, 2023
1 parent fb2d40e commit ecbe0b9
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/TagzApp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy Web to Azure
on:
push:
branches:
- main
workflow_dispatch:
branches: [ "main" ]


env:
AZURE_WEBAPP_NAME: TagzApp
AZURE_WEBAPP_PACKAGE_PATH: ./published
CONFIGURATION: Release
DOTNET_CORE_VERSION: 7.0.x
WORKING_DIRECTORY: .
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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.TagzApp_1363 }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}

0 comments on commit ecbe0b9

Please sign in to comment.