Skip to content

Deploy to Azure Web App #119

Deploy to Azure Web App

Deploy to Azure Web App #119

Workflow file for this run

name: Deploy to Azure Web App
on:
push:
branches:
- main
- dev
paths:
- "docs/**"
workflow_dispatch:
env:
AZURE_APP_NAME: "lumexui"
SLOT_NAME: ${{ github.ref == 'refs/heads/main' && 'Production' || 'staging' }}
ENVIRONMENT_NAME: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- name: Build components
run: dotnet build ./src/LumexUI -c Release
- name: Publish
run: dotnet publish ./docs/LumexUI.Docs -c Release -o lumexui
- name: Upload artifact for deployment
uses: actions/upload-artifact@v4
with:
name: .net-app
path: lumexui
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: ${{ env.ENVIRONMENT_NAME }}

Check failure on line 47 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / Deploy to Azure Web App

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yml (Line: 47, Col: 13): Unrecognized named-value: 'env'. Located at position 1 within expression: env.ENVIRONMENT_NAME
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
permissions:
id-token: write
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: .net-app
- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_AE23C767A44848FE995578A1C037403D }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_43E73B5325A2495B9E40E95184EE9EDE }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_9DD2FEFA18374E8484A5B85D9F23348C }}
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
with:
app-name: ${{ env.AZURE_APP_NAME }}
slot-name: ${{ env.SLOT_NAME }}
package: .