Skip to content

Update main.yml

Update main.yml #11

Workflow file for this run

name: Publish 🚀
on:
workflow_dispatch:
push:
branches:
- main
env:
AZURE_WEBAPP_NAME: Tech-Hub1
AZURE_WEBAPP_PACKAGE_PATH: "./publish"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Restore
run: dotnet restore ./Tech_Hub.sln
- name: Build
run: dotnet build ./Tech_Hub.sln --configuration Release --no-restore
- name: Publish
run: dotnet publish ./Tech_Hub.sln --configuration Release --no-build --output '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}'
- name: Deployment
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE }}
package: "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}"