Skip to content

Merge pull request #32 from varianter/chore/docs/document-database-co… #9

Merge pull request #32 from varianter/chore/docs/document-database-co…

Merge pull request #32 from varianter/chore/docs/document-database-co… #9

name: [PROD] Deploy Backend

Check failure on line 1 in .github/workflows/deploy-backend-prod.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-backend-prod.yml

Invalid workflow file

You have an error in your yaml syntax
on:
workflow_dispatch:
env:
AZURE_WEBAPP_NAME: vibes-backend-prod # set this to your application's name
AZURE_WEBAPP_PACKAGE_PATH: './backend' # set this to the path to your web app project, defaults to the repository root
DOTNET_VERSION: '7.x.x' # set this to the dot net version to use
jobs:
build-backend-and-deploy:
runs-on: ubuntu-latest
environment: Production
steps:
# Checkout the repo
- uses: actions/checkout@main
# Setup .NET Core SDK
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
# Run dotnet build and publish
- name: dotnet build and publish
working-directory: backend/
run: |
dotnet restore
dotnet build --configuration Release
dotnet publish -c Release --property:PublishDir='${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/build'
# Deploy to Azure Web apps
- name: 'Run Azure webapp deploy action using publish profile credentials'
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }} # Replace with your app name
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_BACKEND }} # Define secret variable in repository settings as per action documentation
package: 'backend/${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/build'