Files
social-media/.github/workflows/backend-ci.yml
2025-01-15 15:32:09 -05:00

34 lines
898 B
YAML

name: Backend CI/CD
on:
push:
branches: [ "main" ]
jobs:
build_and_deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.x'
- name: Restore dependencies
run: |
cd backend
dotnet restore
- name: Build
run: |
cd backend
dotnet build --configuration Release
- name: Publish
run: |
cd backend
dotnet publish --configuration Release --output ./publish
- name: Deploy to Azure WebApp
uses: azure/webapps-deploy@v2
with:
app-name: "<YOUR_APP_SERVICE_NAME>"
slot-name: "production" # if using deployment slots
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ./backend/publish