Merge pull request #183 from Mojtabarezaei4/development #7
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
name: Deploy Queueomatic to Azure Web App | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- 'main' | |
env: | |
AZURE_WEBAPP_NAME: queueomatic | |
AZURE_WEBAPP_PACKAGE_PATH: './Queueomatic' | |
DOTNET_VERSION: '7.0.x' | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
environment: prod | |
steps: | |
# Checkout the repo | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: dotnet build and publish | |
run: | | |
dotnet restore ./Queueomatic | |
dotnet build ./Queueomatic --configuration Release | |
dotnet publish ./Queueomatic -c Release -o '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/myapp' | |
- name: 'Deploy' | |
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 }}/myapp' |