Skip to content

Workflow file for this run

name: Deploy to Azure Web App
on:
push:
branches:
- main
env:
AZURE_WEBAPP_NAMES: ["test-service", "app-service"]

Check failure on line 9 in .github/workflows/cicd.yml

View workflow run for this annotation

GitHub Actions / Deploy to Azure Web App

Invalid workflow file

The workflow is not valid. .github/workflows/cicd.yml (Line: 9, Col: 23): A sequence was not expected .github/workflows/cicd.yml (Line: 11, Col: 31): A sequence was not expected
AZURE_WEBAPP_SHARED_LIBS_PATH: "libs"
AZURE_WEBAPP_SERVICE_PATHS: ["test-service", "app-service"]
AZURE_WEBAPP_PUBLISH_PROFILES:
["${{ secrets.PUBLISH_PROFILE }}", "${{ secrets.APP_PUBLISH_PROFILE }}"]
jobs:
build-and-deploy:
strategy:
matrix:
service: ${{ fromJson(secrets.AZURE_WEBAPP_NAMES) }}
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Setup Node Js
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install Dependencies
run: npm ci
- name: Merge shared libs with service package and create zip file
run: |
mkdir -p deployment_packages
cp -r $AZURE_WEBAPP_SHARED_LIBS_PATH/* deployment_packages/
cp -r ${{fromJson(secrets.AZURE_WEBAPP_SERVICE_PATHS)[matrix.service]}}/* deployment_packages/
cd deployment_packages && zip -r ../${{matrix.service}}.zip . -x '*.git*' && cd ..
working-directory: ${{ github.workspace }}
- name: Deploy to Azure
uses: azure/webapps-deploy@v2
with:
app-name: ${{matrix.service}}
publish-profile: ${{fromJson(secrets.AZURE_WEBAPP_PUBLISH_PROFILES)[matrix.service]}}
package: ${{ github.workspace }}/${{matrix.service}}.zip